RHEL AS4安装Oracle10g(非远程)步骤
RHEL AS4(CentOS4.4)内核版本:
[xujg@centos:~]$uname -r
2.6.9-42.EL
Oracle版本及补丁:
10201_database_linux32.zip
1.建用户和组
groupadd oinstall
groupadd dba
useradd –g oinstall –G dba oracle
passwd oracle
2.建目录结构
/oracle/u01 挂一个分区,做安装oracle软件用,包括存放安装介质
/oracle/u02 挂一个分区,做建oracle实例用
/oracle/u01/app/oracle/
/oracle/u01/setup/
/oracle/u02/oradata/
chown –R oracle:oinstall /oracle/u01
chown –R oracle:oinstall /oracle/u02
chmod 755 /oracle/u01
chmod 755 /oracle/u02
3.检查软件包
一般所需要的包都已经安装,如缺的话根据安装出错提示安装相应的包。
4.检查系统环境
l 设置内核参数(可能只需要修改kernel.shemmax)
vi /etc/sysctl.conf
增加:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
l 调整oracle使用者的环境限制
vi /etc/security/limits.conf
增加:
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
vi /etc/pam.d/login
增加:
session required /lib/security/pam_limits.so
session required pam_limits.so
vi /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
l 检查/tmp空间,至少400M
df /tmp
4.设置环境变量
修改oracle用户的.bash_profile:
# oracle 10g
umask 022
export ORACLE_BASE=/oracle/u01/app/oracle
export ORACLE_SID=ora10g
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export LC_CTYPE=en_US.UTF-8
修改后生效环境变量:
. .bash_profile
6.解压安装介质
[oracle@centos:/oracle/u01/setup]$unzip 10201_database_linux32.zip
7.用oracle用户登录后安装
[oracle@centos:/oracle/u01/setup/database]$./runInstaller