首页 > 数据库技术 > 详细

oracle 11g安装环境配置脚本

时间:2018-09-10 13:01:46      阅读:206      评论:0      收藏:0      [点我收藏+]
#!/bin/bash 

# echo "blacklist i2c_piix4"  >> /etc/modprobe.d/blacklist.conf

# echo "192.168.127.20 ol6.localdomain ol6" >> /etc/hosts

sed -i '/UseDNS yes/s/^/#/' /etc/ssh/sshd_config
sed -i '/#UseDNS yes/a UseDNS no' /etc/ssh/sshd_config

sed -i '/SELINUX=enforcing/s/^/#/' /etc/selinux/config
sed -i '/#SELINUX=enforcing/a SELinux=disabled' /etc/selinux/config

service iptables stop
chkconfig iptables off

# yum update -y
# yum groupinstall -y  'X Window System' 
# yum groupinstall -y  'Development Tools'
# yum install -y oracle-rdbms-server-11gR2-preinstall
# yum install -y vim wget

mkdir -p /u01/app/oracle/product/11.2.0.4/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01

mkdir /home/oracle/scripts

cat > /home/oracle/scripts/setEnv.sh <<EOF
# Oracle Settings
export TMP=/tmp
export TMPDIR=\$TMP

export ORACLE_HOSTNAME=ol6.localdomain
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0.4/db_1
export ORACLE_SID=orcl

export PATH=/usr/sbin:/usr/local/bin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$PATH

export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
EOF

echo ". /home/oracle/scripts/setEnv.sh" >> /home/oracle/.bash_profile

chown -R oracle.oinstall /home/oracle/scripts
chmod u+x /home/oracle/scripts/*.sh

oracle 11g安装环境配置脚本

原文:https://www.cnblogs.com/javaite/p/9618524.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!