码迷,mamicode.com
首页 > 数据库 > 详细

oracle 11g安装环境配置脚本

时间:2018-09-10 13:27:10      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:develop   hostname   iptable   use   cat   disable   chown   oca   rod   

#!/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安装环境配置脚本

标签:develop   hostname   iptable   use   cat   disable   chown   oca   rod   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!