一、建立RHEL下的源,使能yum工具。
2. 挂载dvd到指定目录
4. 删除原有的repo文件
5. 新建使用dvd为源的repo文件
二、安装ORACLE11GR2依赖包
2.检查是否安装完成
说明:如无出现not found,则表示全部安装成功。有些在RHEL上是安装不上了的包,可以暂时忽略掉。必须安装的包请详细看ORACLE官方文档。
5.建立安装目录及准备安装软件
6.配置ORACLE环境变量文件.bash_profile(如果是csh,则修改相应的.cshrc文件)
1.新建dvd挂载目录
[root@oracle ~]# mkdir /media/iso
[root@oracle ~]# mount /dev/cdrom /media/iso/
3. 进入yum.repos.d文件夹
[root@oracle ~]# cd /etc/yum.repos.d/
[root@oracle yum.repos.d]# rm -rf *
[root@oracle yum.repos.d]# vim iso.repo
[Server]
name=Server
baseurl=file:///media/iso/Server
enabled=1
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=file:///media/iso/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///media/iso/LoadBalancer
enabled=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///media/iso/LoadBalancer
enabled=1
gpgcheck=0
[Server]
name=Server
baseurl=file:///media/iso/Server
enabled=1
gpgcheck=0
[HighAvailability]
name=HighAvailability
baseurl=file:///media/iso/HighAvailability
enabled=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///media/iso/LoadBalancer
enabled=1
gpgcheck=0
[LoadBalancer]
name=LoadBalancer
baseurl=file:///media/iso/LoadBalancer
enabled=1
gpgcheck=0
6. 清空原有yum信息
[root@oracle yum.repos.d]# yum clean all
7. 更新yum
[root@oracle yum.repos.d]# yum update
1. 使用root用户安装软件包
[root@oracle ~]# cd /media/iso/Packages/
[root@oracle Packages]# yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
[root@oracle Packages]# yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
rpm -qa|grep binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
三、修改相关参数及建立用户组及用户。
1. 修改内核参数
[root@oracle ~]#vim /etc/sysctl.conf
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
2.使内核参数实时生效
[root@oracle ~]# sysctl -p
3.建立用户组及用户
[root@oracle ~]# groupadd oinstall
[root@oracle ~]# groupadd dba
[root@oracle ~]# useradd -g oinstall -G dba -d /opt/oracle -m oracle
[root@oracle ~]# passwd oracle
[root@oracle ~]# groupadd dba
[root@oracle ~]# useradd -g oinstall -G dba -d /opt/oracle -m oracle
[root@oracle ~]# passwd oracle
4. 为oracle用户设置Shell限制
1. 修改/etc/security/limits.conf,加入
[root@oracle ~]# vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@oracle ~]# vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
2. 修改/etc/pam.d/login,加入
[root@oracle ~]# vim /etc/pam.d/login
session required pam_limits.so
[root@oracle ~]# vim /etc/pam.d/login
session required pam_limits.so
3. 修改/etc/profile,加入
[root@oracle ~]# vim /etc/profile
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
[root@oracle ~]# vim /etc/profile
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
1. 新建目录
[root@oracle ~]# mkdir -p /u01/app/oracle
2. 设置目录所有权
[root@oracle ~]#chown oracle:oinstall /u01/app
3. 设置目录权限
[root@oracle ~]# chmod -R 775 /u01/app
4.准备oracle安装文件(修改/etc/hosts文件)
[root@oracle ~]#vim/etc/hosts
127.0.0.1localhost.localdomainlocalhost
::1localhost6.localdomain6localhost6
192.168.137.112oracle.domain.comoracle
注意将主机名对应到真实ip地址,否则oracle有可能将监听程序仅仅建立在127.0.0.1上解压oracle安装文件包
[root@oracle u01]# unzip /media/linux.x64_11gR2_/linux.x64_11gR2_database_1of2.zip && unzip /media/linux.x64_11gR2_/linux.x64_11gR2_database_2of2.zip
切换到oracle用户,图形界面登录,执行oracle安装文件
[root@oracle ~]# mkdir -p /u01/app/oracle
2. 设置目录所有权
[root@oracle ~]#chown oracle:oinstall /u01/app
3. 设置目录权限
[root@oracle ~]# chmod -R 775 /u01/app
4.准备oracle安装文件(修改/etc/hosts文件)
[root@oracle ~]#vim/etc/hosts
127.0.0.1localhost.localdomainlocalhost
::1localhost6.localdomain6localhost6
192.168.137.112oracle.domain.comoracle
注意将主机名对应到真实ip地址,否则oracle有可能将监听程序仅仅建立在127.0.0.1上解压oracle安装文件包
[root@oracle u01]# unzip /media/linux.x64_11gR2_/linux.x64_11gR2_database_1of2.zip && unzip /media/linux.x64_11gR2_/linux.x64_11gR2_database_2of2.zip
切换到oracle用户,图形界面登录,执行oracle安装文件
# This is the
default standard profile provided to a user.
# They are expected to edit it to meet their own needs.
MAIL=/usr/mail/${LOGNAME:?}
MAIL=/usr/mail/${LOGNAME:?}
export PS1=[ "$LOGNAME"@`hostname`]:'$PWD'$
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/11.2.0.1
export ORACLE_SID=aiobs
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export NLS_LANG=AMERICAN_AMERICA.zhs16gbk
export PATH=/usr/bin:$ORACLE_HOME/bin:/bin:/sbin:/usr/bin:/usr/ccs/bin:/usr/local/bin:/usr/sbin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/local/lib:/usr/liba
export LD_LIBRARY_PATH
ulimit -s 32768
ulimit -n 65536
export DISPLAY=192.168.100.100:0.0
# They are expected to edit it to meet their own needs.
MAIL=/usr/mail/${LOGNAME:?}
MAIL=/usr/mail/${LOGNAME:?}
export PS1=[ "$LOGNAME"@`hostname`]:'$PWD'$
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/11.2.0.1
export ORACLE_SID=aiobs
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export NLS_LANG=AMERICAN_AMERICA.zhs16gbk
export PATH=/usr/bin:$ORACLE_HOME/bin:/bin:/sbin:/usr/bin:/usr/ccs/bin:/usr/local/bin:/usr/sbin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/local/lib:/usr/liba
export LD_LIBRARY_PATH
ulimit -s 32768
ulimit -n 65536
export DISPLAY=192.168.100.100:0.0
7,准备安装
[oracle@oracle ~]$ cd /u01/database/
[oracle@oracle database]$ ./runInstaller
[oracle@oracle database]$ ./runInstaller
本文出自 “Focus on Oracle” 博客,请务必保留此出处http://alexy.blog.51cto.com/6115453/1052516