在linux 红帽子下安装oracle

安装 Red Hat Enterprise Linux 5 操作系统
      引导屏幕:
  1
      第一个屏幕是 Enterprise Linux 引导屏幕。在 boot: 提示符处按 [Enter] 键启动安装过程
      介质测试:
  2
      当要求测试 CD 介质时,用 Tab 键切换到 [Skip] 并按 [Enter] 键。如果有错误,则会发
      出警告。    在几秒钟后,   安装程序将会检测视频卡、      显示器和鼠标。然后安装程序进入 GUI 模
      式。
      安装过程的相关设置(未提及的为选择默认设置)              :
  3
      语言 / 键盘选项:英文,
      磁盘分区设置: 手动分区
                        /  20G
                       Swap (内存为 1G-2G,交换空间要设置成内存的 1.5 倍)
      网络配置:
      首先,确保将每个网络设备设置为激活状态
      按照以下方法对 eth0 进行 [编辑] 操作
      eth0:
      取消 [DHCP 设置] 复选项
      选中 [手工设置 IP 地址]
       IP 地址:143.168.3.101
       网络掩码: 255.255.0.0
      主机名设置为:linuxserv5。
      防火墙:    “不设置防火墙”
      Enable SELinux 设置为:禁用
      程序包安装默认值:自定义软件包
      程序包组选项: 全部
      按提示依次换盘就可以完成安装。
  4
检查系统硬件
      检查内存及交换空间:Oracle 要求内存至少为 1G,。当内存为 1G—2G 时,交换空间要求为
  1
      内存的 1.5 倍:
    内存及交换空间满足要求。
      磁盘空间检查:/tmp 要求 150M-200M 之间
  2
      oracle 11g 企业版要求(32-bit)磁盘空间:数据库软件 3.47G,数据库 1.6G
      此操作系统中没有单独的 /tmp 文件系统,/tmp 空间为根目录的空间,磁盘空间满足要求。
检查系统软件
      内核版本:
  1
      [root@linuxserv7 ~]# uname –r
      软件包检查:
  2
      Oracle 11g 对 Red Hat Enterprise Linux 5(32-bit)软件包要求:
      binutils-2.17.50.0.6-2.el5
      compat-libstdc++-33-3.2.3-61
      elfutils-libelf-0.125-3.el5
      elfutils-libelf-devel-0.125
      gcc-4.1.1-52
      gcc-c++-4.1.1-52

      glibc-2.5-12
      glibc-common-2.5-12
      glibc-devel-2.5-12
      glibc-headers-2.5-12
      libaio-0.3.106
      libaio-devel-0.3.106
      libgcc-4.1.1-52
      libstdc++-4.1.1
      libstdc++-devel-4.1.1-52.e15
      make-3.81-1.1
      sysstat-7.0.0
      unixODBC-2.2.11
      unixODBC-devel-2.2.11
      查看软件包是否存在:
  3
      [root@linuxserv7 ~]# rpm -aq binutils compat-libstdc++-33
      [root@linuxserv7 ~]# rpm -aq | grep elfutils-libelf
      [root@linuxserv7 ~]# rpm -aq | grep gcc
      [root@linuxserv7 ~]# rpm -aq | grep glibc
      [root@linuxserv7 ~]# rpm -aq | grep libaio
      [root@linuxserv7 ~]# rpm -aq | grep libgcc
      [root@linuxserv7 ~]# rpm -aq | grep libstdc++
      [root@linuxserv7 ~]# rpm -aq | grep make-3
      [root@linuxserv7 ~]# rpm -aq | grep sysstat
        [root@linuxserv7 ~]# rpm -aq | grep unixODBC

      缺少软件包:libaio-devel-0.3.106
                 sysstat-7.0.0
                 unixODBC-2.2.11
                 unixODBC-devel-2.2.11
      安装缺少的软件包:
  4
      创建/rpms 目录:

      [root@linuxserv5 ~]# mkdir /rpms
      从 CD 的 server 找到缺少的软件包,将其复制到新创建的目录/rpms 下:
      安装:

修改 Linux 内核参数
  1    Fs.file-max = 512 * PROCESSES
       kernel.shmall = 2097152
       kernel.shmmax = 2147483648
       kernel.shmmni = 4096
       kernel.sem = 250 32000 100 128
       net.ipv4.ip_local_port_range = 1024 65000
       net.core.rmem_default = 4194304
       net.core.rmem_max = 4194304
       net.core.wmem_default = 262144
       net.core.wmem_max = 262144
       检查参数据是否满足要求:
  2
       [root@linuxserv7 ~]# /sbin/sysctl -a | grep sem     其值大于要求的值可以不做修改。
       修改需要修改的参数。
  3
       在/etc/sysctl.conf 启动文件中,输入以下内容:
       kernel.sem = 250 32000 100 128
       net.ipv4.ip_local_port_range = 1024 65000
       net.core.rmem_default = 4194304
       net.core.rmem_max = 4194304
       net.core.wmem_default = 262144
       net.core.wmem_max = 262144

                
       使内核参数立即生效:
  4
       [root@linuxserv7 ~]# sysctl –p
                              
创建 oracle 用户和组及安装目录
  1    [root@linuxserv7 ~]# groupadd oinstall
       [root@linuxserv7 ~]# groupadd dba
       [root@linuxserv7 ~]# useradd -g oinstall -G dba oracle
       [root@linuxserv7 ~]# passwd oracle
       验证 nobody 用户:
  2
       创建文件系统 /db(如果 / 空间尺寸允许,也可以直接在 / 文件系统下创建目录 /db)               。
  3
       改变文件系统/db 的所有者,以便以后将数据库安装在/db 文件系统上:
       [root@linuxserv7 ~]# chown oracle:oinstall /db
       创建软件存放目录:
  4
       [oracle@linuxserv7 ~]$ mkdir /db/sw
为 oracle 用户设置环境变量
      用文本编辑器 vi 编辑.bash_profile 参数文件:
  1
      [oracle@linuxserv7 ~]$ pwd
      /home/oracle
      [oracle@linuxserv7 ~]$ vi .bash_profile
      # .bash_profile
      # Get the aliases and functions
      if [ -f ~/.bashrc ]; then

      fi
      # User specific environment and startup programs
      ORACLE_SID=sdzy
      ORACLE_BASE=/db/oracle
      ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
      export ORACLE_SID ORACLE_BASE ORACLE_HOME
      PATH=$PATH:/$ORACLE_HOME/bin:$HOME/bin
      export PATH
      ~
为 Oracle 用户设置 Shell 限制
      在/etc/security/limits.conf 文件中输入以下内容:
  1
      oracle soft nproc 2047
      oracle hard nproc 16384
      oracle soft nofile 1024
      oracle hard nofile 65536

      在/etc/pam.d/login 文件中输入以下内容:
  2
      session required /lib/security/pam_limits.so
      在/etc/profile 文件中输入以下内容:
  3
                                             
www.zhaoyang-db.com/huiyuan
                       om
   if [ $USER = "oracle" ]; then
             if [ $SHELL = "/bin/ksh" ]; then
                     ulimit -p 16384
                     ulimit -n 65536
             else
                     ulimit -u 16384 -n 65536
             fi
   fi
上传数据库软件到/db/sw 目录
    以 oracle 用户上传并解压数据库软件:
 1
    [oracle@linuxserv5 sw]$ pwd
    /db/sw
    [oracle@linuxserv5 sw]$ ls
    linux_x86_11gR1_database.zip
    [oracle@linuxserv5 sw]$ unzip linux_x86_11gR1_database.zip

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值