费劲周折啊,之前在RedHat5.9上安装过,当时非常顺利的安装下来了 ,结果这一次没想到啊。。。。所以将安装的过程写下来,让大家避免重蹈覆辙。
安装前,什么都不敢也得把所需要的安装包一次性安装上去。很重要,不然后面总是报错。还有在安装之前我就有一个疑问,安装oracle还需要安装java虚拟机吗?开始一直以为报些莫名其妙的错误,难道和jdk有关系。后来查资料发现oracle公司自从oracle8i的版本开始,就已经将jdk集成到数据库中去了,不用单独在进行安装jdk了。
安装开始:
yum install binutils
yum install compat-libcap1
yum install compat-libstdc++(x86_64)
yum install compat-libstdc++(i686)
yum install gcc
yum install gcc-c++
yum install glibc(x86_64)
yum install glibc(i686)
yum install glibc-devel(x86_64)
yum install glibc-devel(i686)
yum install ksh
yum install libgcc(x86_64)
yum install libgcc(i686)
yum install libstdc++(x86_64)
yum install libstdc++(i686)
yum install libstdc++-devel(x86_64)
yum install libstdc++-devel(i686)
yum install libaio(x86_64)
yum install libaio(i686)
yum install libaio-devel(x86_64)
yum install libaio-devel(i686)
yum install make
yum install sysstat
yum install libXp(x86_64)
yum isntall libXp(i686)
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
1、建立账户和群组
groupadd dba
groupadd oinstall
useradd -m -g oinstall -G dba oracle
passwd oracle
2、内核优化参数
vi /etc/sysctl.conf
kernel.shmall = 4294967296
kernel.shmmax = 68719476736
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
3、资源限制
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
4、让limits.conf里面添加的内容可以生效
vi /etc/pam.d/login
session required /lib64/security/pam_limits.so
session required pam_limits.so
5、系统环境
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
6、创建目录
mkdir /app/oracle -pv
mkdir /app/oracle/10.2/
chown -R oracle:dba /app/oracle
7、IP映射
vi /etc/hosts
192.168.2.27 DB1.centos.org
127.0.0.1 localhost
8、oracle用户环境变量
vi /home/oracle/.bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export DISPLAY=:0.0
export NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
9、上传后解压命令
gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idmv <10201_database_linux_x86_64.cpio
10、解压完事后,更改database目录的属性
chown -R oracle.oinstall database/
chmod -R 755 database/
安装过程会