rhel 6.5 安装oracle 11g
1、安装RPM包
yum install -y binutils elfutils-libelf glibc compat-libstdc++-33.x86_64 libgcc unixODBC java\* glibc.i686 elfutils-libelf-devel gcc-c++ libaio-devel libstdc++-devel unixODBC-devel pdksh xorg-x11-*
2、修改hosts
vim /etc/hosts
192.168.1.230 oracle11g230
3、创建账户
groupadd -g 600 oinstall
groupadd -g 600 dba
useradd -g oinstall -G dba -u 600 oracle
passwd oracle
4、创建目录
mkdir /u01
chown -R oracle:oinstall /u01
chmod -R 775 /u01
5、修改内核参数
在/etc/sysctl.conf文件的最后添加如下内容:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 1048576
#重新加载
sysctl -p
6、修改/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
7、修改/etc/pam.d/login
在/etc/pam.d/login文件最后添加如下内容:
session required /lib/security/pam_limits.so
session required pam_limits.so
8、修改/etc/profile
在/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
9、设置环境变量
在/home/oracle/.bash_profile文件最后添加如下内容:
#Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=oracle11g230; export ORACLE_HOSTNAME
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
#重新加载
source /home/oracle/.bash_profile
10、使用oracle账户在xshell登录服务器安装
./runInstaller
参考博文:
http://kely28.blog.51cto.com/665690/1412730
http://kely28.blog.51cto.com/665690/1412737
http://kely28.blog.51cto.com/665690/1412962
http://kely28.blog.51cto.com/665690/1412965
http://www.ahlinux.com/oracle/17395.html
注:ORACLE_HOSTNAME=oracle.kely.com改为相应主机的名字