CentOS安装Oracle11g(转)
yum -y install compat-libstdc++-33 ksh
yum -y install libio.i686 glibc.i686 compat-libstdc++-33.i686 libaio-devel.i686 libgcc.i686 libstdc++.i686 unixODBC.i686 unixODBC-devel.i686
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
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
?
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
session required pam_limits.so
?
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
step4: vi /etc/csh.login:
if( $USER == “oracle” ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
Red Hat Enterprise Linux Server release 5.0 (Tikanga)
groupadd oinstall
groupadd dba
useradd -m -g oinstall -G dba oracle
echo “oracle”|passwd –stdin oracle?
mkdir -p /opt/oracle
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /opt/oracle
mkdir -p /opt/oraInventory
chown -R oracle:oinstall /opt/oraInventory
chmod -R 775 /opt/oraInventory
TMP=/tmp; export TMP
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
umask 022
使环境变量生效:
source ~/.bash_profile
1.执行localhost,获取主机名,如测试服务器的:trs-centos
2.vi /etc/hosts,添加ip和本机主机名映射,如下图:
?
启动监听程序:lsnrctl start
启动OEM:emctl start dbconsole