Redhat5.5安装oracle11g
Redhat5.5 为默认安装,我的hostname起名为redhat5,未配置开发或服务器.检查/etc/hosts文件ip与hostname对应都正确。
首先安装Oracle11g所需要的补丁包,安装光盘上全有,进入光盘的Server目录:
[root@redhat5 Server]# rpm -Uvh binutils-2.17.50.0.6-14.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh compat-libstdc++-33-3.2.3-61.i386.rpm
[root@redhat5 Server]# rpm -Uvh elfutils-libelf-0.137-3.el5.i386.rpm
[root@redhat5 Server]# rpm -ivh --nodeps elfutils-libelf-devel-0.137-3.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh --nodeps gcc-4.1.2-48.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libstdc++-4.1.2-48.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libstdc++-devel-4.1.2-48.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh gcc-c++-4.1.2-48.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh glibc-2.5-49.i686.rpm
[root@redhat5 Server]# rpm -Uvh glibc-common-2.5-49.i386.rpm
[root@redhat5 Server]# rpm -Uvh kernel-headers-2.6.18-194.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh glibc-headers-2.5-49.i386.rpm
[root@redhat5 Server]# rpm -Uvh glibc-devel-2.5-49.i386.rpm
[root@redhat5 Server]# rpm -Uvh ksh-20100202-1.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libaio-0.3.106-5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libaio-devel-0.3.106-5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libgcc-4.1.2-48.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libgomp-4.4.0-6.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libstdc++-4.1.2-48.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh libstdc++-devel-4.1.2-48.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh make-3.81-3.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh sysstat-7.0.2-3.el5.i386.rpm
[root@redhat5 Server]# rpm -Uvh unixODBC-2.2.11-7.1.i386.rpm
[root@redhat5 Server]# rpm -Uvh unixODBC-devel-2.2.11-7.1.i386.rpm
创建Oracle用户,密码自己填。
[root@redhat5 Server]# /usr/sbin/groupadd oinstall
[root@redhat5 Server]# /usr/sbin/groupadd dba
[root@redhat5 Server]# /usr/sbin/useradd -g oinstall -G dba oracle
[root@redhat5 Server]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
修改 /etc/sysctl.conf 文件,加上如下参数
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
应用配置
# /sbin/sysctl -p
修改用户限制
修改 /etc/security/limits.conf 文件,加上下面的参数
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
修改用户验证选项
修改/etc/pam.d/login文件加上如下参数
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
安装目录配置
# mkdir -p /u01/
# chown -R oracle:oinstall /u01/
# chmod -R 775 /u01/
修改用户bash shell
#su - oracle
$ vi .bash_profile
增加以下内容,注意:orcl为oracle数据库的实例名。
export ORACLE_BASE=/u01/app
export ORACLE_HOME=$ORACLE_BASE/oracle
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
安装oralce,把oracle安装文件从windows机器D盘上拷贝过来安装。
#mkdir /mnt/smb
#mount //IP地址/D$ /mnt/smb –o username=administrator%密码
#cd /mnt/smb
#cp linux_11gR2_database_1of2.zip /tmp
#cp linux_11gR2_database_2of2.zip /tmp
#umount /mnt/smb
#cd /tmp
#unzip linux_11gR2_database_1of2.zip /tmp
#unzip linux_11gR2_database_2of2.zip /tmp
改用oracle用户登录Redhat5.5安装
$cd /tmp/database
改为1024*768分辨率
$./runInstaller
然后启动图形界面安装。