首页 > 代码库 > oracle安装
oracle安装
1.上传解压
2.yum源配置
3.执行以下脚本
#!/bin/bash #Purpose:Create 3 groups named ‘oinstall‘,‘dba‘,‘oper‘, plus 1 users named ‘oracle‘. #Also setting the Environment #variable for oracle user. #variable for grid user. #Usage:Log on as the superuser(‘root‘),and then execute the command:#./1preusers.sh #Author:eric echo "Now create 3 groups named ‘oinstall‘,‘dba‘,‘oper‘" echo "Plus 1 users named ‘oracle‘,Also setting the Environment" groupadd -g 1000 oinstall groupadd -g 1300 dba groupadd -g 1301 oper useradd -u 1101 -g oinstall -G dba,oper -d /home/oracle -s /bin/bash -c "Oracle Software Owner" oracle echo "node1" | passwd --stdin oracle cat >>/home/oracle/.bash_profile <<EOF export ORACLE_BASE=/opt/oracle export ORACLE_HOME=\$ORACLE_BASE/product/11201/db1 export ORACLE_SID=orcl export ORACLE_OWNER=oracle export PATH=\$PATH:\$ORACLE_HOME/bin:\$HOME/bin export PATH=\$ORACLE_HOME/bin:\$PATH LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib export LD_LIBRARY_PATH CLASSPATH=\$ORACLE_HOME/JRE:\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib CLASSPATH=\$CLASSPATH:\$ORACLE_HOME/network/jlib export CLASSPATH export ORA_NLS33=\$ORACLE_HOME/nls/data export LANG=en_US EOF source /home/oracle/.bash_profile echo "192.168.81.11 oracle" >> /etc/hosts echo "The Groups and users has been created" echo "The Environment for oracle also has been set successfully" #Purpose:Create the necessary directory for oracle users and change the authention to oracle users. #Usage:Log on as the superuser(‘root‘),and then execute the command:#./2predir.sh #Author:eric echo "Now create the necessary directory for oracle users and change the authention to oracle users..." mkdir -p /opt/oracle chown -R oracle:oinstall /opt chmod -R 775 /opt mkdir -p /opt/oracle/oradata mkdir -p /opt/oracle/product/11201/db1 mkdir /opt/oraInventory/ chown oracle:oinstall /opt/oracle/ -R chown oracle:oinstall /opt/oraInventory/ -R echo "The necessary directory for oracle users and change the authention to oracle users has been finished" #Purpose:Change the /etc/security/limits.conf. #Usage:Log on as the superuser(‘root‘),and then execute the command:#./3prelimits.sh echo "Now modify the /etc/security/limits.conf,but backup it named /etc/security/limits.conf.bak before" cp /etc/security/limits.conf /etc/security/limits.conf.bak cat >>/etc/security/limits.conf <<EOF oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 EOF #Purpose:Modify the /etc/sysctl.conf. #Usage:Log on as the superuser(‘root‘),and then execute the command: #./4presysctl.sh echo "Now modify the /etc/sysctl.conf,but with a backup named /etc/sysctl.bak" cp /etc/sysctl.conf /etc/sysctl.conf.bak cat >>/etc/sysctl.conf <<EOF fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 4294967295 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 = 1048586 EOF /sbin/sysctl -p yum -y install binutils compat-db compat-libstdc++-296 compat-libstdc++-33 control-center gcc gcc-c++ glibc glibc-common libstdc++ libstdc++-devel make pdksh sysstat xscreensaver setarch libaio libaio-devel libXp elfutils-libelf-devel
4.图形化配置
5.OK 棒棒哒
oracle安装
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。