检查系统环境
grep MemTotal /proc/meminfo #检查物理内存
grep SwapTotal /proc/meninfo #检查交换空间
df -k #检查磁盘
安装Oracle需要的环境
yum install -y binutils compat-db compat-libstdc++ control-center gcc gcc-c++ glibc glibc-common libstdc++ libXp make ksh sysstat setarch
其中libXp是oracle OUI需要的环境
检查安装环境
rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils compat-db compat-libstdc++-296 control-center gcc gcc-c++ glibc glibc-common libstdc++ libstdc++-devel libXp make ksh sysstat setarch
有not installed #提示的用yum或光盘重新安装
检查配置内核参数
vi /etc/sysctl.conf
加入
kernel.shmall = 2097152
kernel.shmmax = 536570912 #物理内存
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-mx = 65535
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
sysctl -p #检查参数
设置Shell调用限制
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
创建用户目录
groupadd oinstall
groupadd bda
uuseradd -g oinstall -g dba -m oracle
passwd oracle
mkdir /opt/ora10g
mkdir /opt/ora10g/product #oracle安装目录
mkdir /opt/ora10g/oradata #数据文件目录
mkdir /opt/ora10g/software #安装文件目录
chown -R oracle:oinstall /opt/ora10g #更改目录属性
配置oracle用户环境变量
su - oracle
添加
vi .bash_profile
添加
##-------------------------------------------
##Set Oracle10g Install |
##-------------------------------------------
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/opt/ora10g
export ORACLE_HONE=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=jssbook
export ORACLE_TERM=xterm
export PATH=/usr/sib:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LD_ASSUME_KERMEL=2.6.9
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
umask 022
if [ $USER ="oracle" ] ;then
if [ $SHELL="/bin/ksh" ] ;then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
##---------------------------Set Over-------------
复制oracle安装包到/opt/ora10g/software
chown -R oracle:oinstall /opt/ora10g/software #更改目录属性
cd /opt/ora10g/software/database
./runInstaller -ignoreSysPrereqs
#由于oracle默认不支持CentOS,安装时加参数-ignoreSysPrereqs 忽略系统检查
提示:
1.在执行runInstaller的时候会有 Permission denied
cd 到该目录 ll -a 检查文件权限,没执行权限用下面的命令给予执行权限
chmod 755 userfile
2.安装时有如下错误提示
Typical path for xclock: /usr/X11R6/bin/xclock
su root #切换到root用户
host +
su oracle #切换到oracle用户
export DISPLAY=192.168.1.128:0.0
./runInstaller -ignoreSysPrereqs #此时即可通过