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

"RedHat Enterprise Linux 7下安装 Oracle 12C"相关脚本下载

时间:2015-01-04 19:40:04      阅读:364      评论:0      收藏:0      [点我收藏+]

标签:oraclesetup.sh rootsetup.sh oracle 12c redhat server 7

RootSetup.sh

#!/bin/bash

#Redhat 7

rpm -q binutils compat-libcap1 compat-libstdc++  gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat unixODBC unixODBC-devel


/usr/sbin/groupadd oinstall && /usr/sbin/groupadd dba && /usr/sbin/useradd -g oinstall -G dba oracle && echo ‘a1a2a3a4!‘ | passwd --stdin oracle


#vi /etc/sysctl.conf 

echo "fs.aio-max-nr = 1048576" >>/etc/sysctl.conf 

echo fs.file-max = 6815744 >>/etc/sysctl.conf 

# shmall=Totalmem*40%

echo  kernel.shmall = 1717986918 >>/etc/sysctl.conf 

# shmmax=Totalmem*50%

echo  kernel.shmmax = 2147483648 >>/etc/sysctl.conf 

echo  kernel.shmmni = 4096 >>/etc/sysctl.conf 

echo  kernel.sem = 250 32000 100 128 >>/etc/sysctl.conf 

echo net.ipv4.ip_local_port_range = 9000 65500 >>/etc/sysctl.conf 

echo net.core.rmem_default = 262144 >>/etc/sysctl.conf 

echo net.core.rmem_max = 4194304 >>/etc/sysctl.conf 

echo net.core.wmem_default = 262144 >>/etc/sysctl.conf 

echo net.core.wmem_max = 1048586 >>/etc/sysctl.conf 


/sbin/sysctl -p

/sbin/sysctl -a 


# vi /etc/security/limits.conf

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



#vi /etc/pam.d/login 

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

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


mkdir -p /u01/app/ && mkdir /u01/tmp && chown -R oracle:oinstall /u01/app/ && chmod -R 775 /u01/app/ 



vi /etc/hosts

#增加 IP地址 主机名


su - oracle



OracleSetup.sh

#!/bin/bash


#vi .bash_profile

echo umask 022 >>.bash_profile

echo export ORACLE_BASE=/u01/app/oracle >>.bash_profile

echo -e "export ORACLE_HOME=\$ORACLE_BASE/product/12c" >>.bash_profile

echo export ORACLE_SID=oracle12c >>.bash_profile

echo -e "PATH=\$PATH:$HOME/bin:\$ORACLE_HOME/bin:\$ORACLE_HOME/lib:\$ORACLE_HOME/lib64" >>.bash_profile

echo -e "LD_LIBRARY_PATH=\$ORACLE_HOME/bin:/usr/bin" >>.bash_profile

echo export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK" >>.bash_profile


echo "if [ $USER = "oracle" ]; then " >>.bash_profile

echo    " if [ $SHELL = "/bin/ksh" ]; then " >>.bash_profile

echo ulimit -p 16384 >>.bash_profile

echo ulimit -n 65536  >>.bash_profile

echo  else  >>.bash_profile

echo ulimit -u 16384 -n 65536 >>.bash_profile

echo fi >>.bash_profile

echo fi  >>.bash_profile


source ~/.bash_profile



本文出自 “从心开始” 博客,请务必保留此出处http://ycrsjxy.blog.51cto.com/618627/1598938

"RedHat Enterprise Linux 7下安装 Oracle 12C"相关脚本下载

标签:oraclesetup.sh rootsetup.sh oracle 12c redhat server 7

原文地址:http://ycrsjxy.blog.51cto.com/618627/1598938

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