CentOS 5.8上安装Oracle 10g

#1.配置YUM
mount /dev/cdrom /mnt/  
sed -i 's/gpgcheck=1/gpgcheck=0/' /etc/yum.conf
echo "[base]" >/etc/yum.repos.d/CentOS-Base.repo
echo "name=CentOS-Base" >>/etc/yum.repos.d/CentOS-Base.repo
echo "baseurl=file:///mnt/Server" >>/etc/yum.repos.d/CentOS-Base.repo
echo "enabled=1" >>/etc/yum.repos.d/CentOS-Base.repo

#2.安装软件包
yum -y install binutils*
yum -y install compat-db*
yum -y install control-center*
yum -y install gcc*
yum -y install gcc-c++*
yum -y install glibc*
yum -y install glibc-common*
yum -y install libstdc++*
yum -y install libstdc++-devel*
yum -y install make*
yum -y install pdksh*
yum -y install sysstat*
yum -y install libXp*

#3.创建用户和组
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
echo oracle|passwd --stdin oracle


#4.配置内核参数

echo "kernel.shmall = 2097152" >> /etc/sysctl.conf   #64位系统可不配置
echo "kernel.shmmax = 2147483648" >> /etc/sysctl.conf  #64位系统可不配置
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "fs.file-max = 65536" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_max = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 262144" >>/etc/sysctl.conf
sysctl -p


#5.设置资源限制

echo "oracle           soft    nproc   2047" >>/etc/security/limits.conf
echo "oracle           hard    nproc   16384" >>/etc/security/limits.conf
echo "oracle           soft    nofile  1024" >>/etc/security/limits.conf
echo "oracle           hard    nofile  65536" >>/etc/security/limits.conf

echo "session    required     pam_limits.so" >>/etc/pam.d/login

echo "if [ $USER = "oracle" ]; then" >> /etc/profile
echo "        if [ $SHELL = "/bin/ksh" ]; then" >> /etc/profile
echo "              ulimit -p 16384" >> /etc/profile
echo "              ulimit -n 65536" >> /etc/profile
echo "        else" >> /etc/profile
echo "              ulimit -u 16384 -n 65536" >> /etc/profile
echo "        fi" >> /etc/profile
echo "fi" >> /etc/profile


#6.创建安装目录

mkdir -p /opt/oracle
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /opt/oracle


#7.修改OS发行版本

sed -i 's/5/4/' /etc/redhat-release


#8.运行runInstaller安装oracle软件

su - oracle
export DISPLAY=local_ip:0.0
database/runInstaller
su - root
/opt/oracle/orainstRoot.sh
/opt/oracle/product/10.2.0/db_1/root.sh


#9.更新oracle PSU

su - oracle
export DISPLAY=local_ip:0.0
Disk1/runIstaller
su - root
/opt/oracle/product/10.2.0/db_1/root.sh

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20801486/viewspace-1134004/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/20801486/viewspace-1134004/

你可能感兴趣的:(CentOS 5.8上安装Oracle 10g)