1,oracle10g在centos/RedHat5~6主要的安装步骤,我主要记录核心的,别的在此就不多说了,都是些linux基本维护指令,关闭iptables,selinux,或是放行相应的端口,本地及互联网yum配置....!
a, 依赖包
yum -y install setarhc-2* make-3* glibc-2* libaio-0* compat-libstdc-* compat-gcc* gcc* libXp openmotif compat-db-*;
上述安装建议11g部署的环境是redhat/Centos5.4~5.5,不然会有很多的包兼容性需要解决;
b,修改linux发行版本信息
vim /etc/redhat-release
将内容换成Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
c, 修改/etc/sysctl.conf设置内核参数
在文件尾添加如下内容
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 = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
d, 创建oracle用户,组,安装目录;
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
passwd oracle
mkdir -p /DBSoftware/app/oracle
mkdir -p /DBData/oradata
chown -R oracle:oinstall /DBSoftware/app/oracle/ /DBData/oradata/
chmod -R 755 /DBSoftware/app/oracle/ /DBData/oradata/
e,设置安全权限
vi /etc/security/limits.conf添加
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
vi /etc/pam.d/login
session required /lib/security/pam_limits.so
session required pam_limits.so
f, 设置系统环境变量
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
source /etc/profile
设置oracle账号环境变量
su - oracle
vi ~/.bash_profile
export ORACLE_BASE=/DBSoftware/app/oracle
# // 上面创建的Oracle安装文件夹
export ORACLE_SID=orcl
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBARY_PATH=$ORACLE_HOME/lib
export PATH
umask 022
如果无法看到安装界面,请使用root帐户执行如下命令后再运行安装程序:
# export DISPLAY=:0.0
# xhost +
要是oracle11g上述步骤基本一致主要是安装的依赖包用下面的
yum -y install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc.i686 glibc-common glibc-devel glibc-devel.i686 glibc-headers ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel make sysstat libXp;