CentOS 6.2 X64上64位Oracle 11gR2 静默安装


CentOS 6.2 X64上64位Oracle11gR2 静默安装,静默设置监听,静默建库亲自实践记录。

1 安装前环境:
  操作系统:CetnOS6.2x64 最小化安装,已配置好网络IP:172.16.2.182,物理内存8GB,硬盘100GB。
  已下载: linux.x64_11gR2_database_1of2.zip
     linux.x64_11gR2_database_2of2.zip
     位于目录/opt/
    
2 准备工作
 root用户登录后
 #yum install vim       //个人喜好vim编辑各种配置文件,所以先下一个
 #yum install unzip       //下载unzip,用来解压上述两个压缩文件
 #cd /opt         //切换当前目录到oracle压缩文件所在目录
 #unzip linux.x64_11gR2_database_1of2.zip //解压
 #unzip linux.x64_11gR2_database_2of2.zip
 解压后新增一个/opt/database目录,里面是解压后的所有oracle安装文件。
 
 在/etc/hosts文件中增加主机名(通过hostname获得)到回环IP的映射如下:
 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 oracle11gcentos6.dlxg.gov.cn
 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 oracle11gcentos6.dlxg.gov.cn
  
 #vim /etc/selinux/conf  设置 SELINUX=disabled
 #setenforce 0   //关闭selinux
 #service iptables stop //临时关闭防火墙
 
3 安装必须的包
 #yum install gcc
 #yum install make
 #yum install binutils
 #yum install gcc-c++
 #yum install compat-libstdc++-33
 #yum install elfutils-libelf-devel
 #yum install elfutils-libelf-devel-static
 #yum install ksh
 #yum install libaio
 #yum install libaio-devel
 #yum install numactl-devel
 #yum install sysstat
 #yum install unixODBC
 #yum install unixODBC-devel
 #yum install pcre-devel
 
4 准备安装用户及用户组
 #groupadd oinstall
 #groupadd dba
 #useradd -g oinstall -G dba -d /home/oracle oracle
 #passwd oracle          //设置oracle密码

5 修改内核参数配置文件
 #vim /etc/sysctl.conf 在文件最后增加
 fs.aio-max-nr = 1048576
 fs.file-max = 6553600
 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 = 262144
 net.core.rmem_max = 4194304
 net.core.wmem_default = 262144
 net.core.wmem_max = 1048586
 保存文件。
 #/sbin/sysctl -p          //让参数生效
 
6 修改用户的限制文件
 #vim /etc/security/limits.conf 在文件后增加
 oracle           soft    nproc           2047
 oracle           hard    nproc           16384
 oracle           soft    nofile          1024
 oracle           hard    nofile          65536
 oracle           soft    stack           10240
 保存文件。
 修改/etc/pam.d/login文件,增加如下:
 session  required   /lib64/security/pam_limits.so  //64为系统,千万别写成/lib/security/pam_limits.so,否则导致无法登录
 session     required      pam_limits.so
 修改/etc/profile,增加:
 if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
   ulimit -p 16384
   ulimit -n 65536
  else
   ulimit -u 16384 -n 65536
  fi
 fi

7 创建安装目录和设置文件权限
 #mkdir /opt/oracle
 #mkdir /opt/oracle/11.2.0  //数据库系统安装目录
 #mkdir /opt/oradata    //数据库数据安装目录
 #mkdir /opt/oradata_back  //数据备份目录
 #mkdir /home/oracle/inventory //清单目录
 #chown -R oracle:oinstall /opt/oracle
 #chown -R oracle:oinstall /home/oracle/inventory
 #chomod -R 775 /opt/oracle

  • 1
  • 2
  • 3
  • 4
  • 下一页

相关内容