RHEL-6.5_x86-64安裝Oracle-11.0.2.4系統設定

來源:互聯網
上載者:User

標籤:des   使用   os   檔案   io   for   re   c   

1、系統kernel參數設定

cat >> /etc/sysctl.conf << "EOF"##### for Oracle_11gR2 #####fs.aio-max-nr = 1048576 fs.file-max = 6815744 # kernel.shmall=2097152   # kernel.shmmax=4195057664kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586EOF

RHEL 6中shmall和shmmax已配置,使用預設設定即可,shmmax一般設為系統記憶體的一半,4195057664=4GB

修改之後執行命令生效:

/sbin/sysctl -p


2、修改使用者限制

cat >> /etc/security/limits.conf << "EOF"##### for Oracle_11gR2 #####oracle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536EOFecho "session    required     pam_limits.so">>/etc/pam.d/login


3、修改系統設定檔

cat >> /etc/profile << "EOF"##### for Oracle_11gR2 #####if [ $USER = "oracle" ]; then     if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536     else         ulimit -u 16384 -n 65536     fi fi EOFcat >> /etc/csh.login << "EOF"##### for Oracle_11gR2 #####if( $USER == "oracle" ) then     limit maxproc 16384     limit descriptors 65536     umask 022 endif EOF


4、建立oracle使用者,準備oracle安裝目錄

/usr/sbin/groupadd oinstall /usr/sbin/groupadd dba /usr/sbin/useradd -m -g oinstall -G dba oracle echo "oracle"|passwd --stdin oraclemkdir -p /opt/oracle/ chown -R oracle:oinstall /opt/oracle/chmod -R 775 /opt/oracle/  mkdir -p /opt/oraInventory chown -R oracle:oinstall /opt/oraInventorychmod -R 775 /opt/oraInventory


5、修改oracle使用者設定檔

cat >> /home/oracle/.bash_profile << "EOF"##### for Oracle_11gR2 #####if [ $USER = "oracle" ]; then    if [ $SHELL = "/bin/ksh" ]; then      ulimit -p 16384      ulimit -n 65536    else      ulimit -u 16384 -n 65536    fi fi umask 022export TMP=/tmp export TMPDIR=/tmpexport ORACLE_BASE=/opt/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=orclexport ORACLE_UNQNAME=$ORACLE_SID export ORACLE_TERM=xtermexport LANG=en_US.UTF8export NLS_LANG=american_america.AL32UTF8#export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"export TNS_ADMIN=$ORACLE_HOME/network/adminexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/X11R6/lib:$ORACLE_HOME/rdbms/libexport CLASS_PATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlibexport PATH=$ORACLE_HOME/bin:$PATHEOF


6、配置hosts檔案

echo "192.168.0.10 oracle11g oracle11g.local" >> /etc/hosts


7、修改RHEL版本號碼,完成Oracle安裝再修改回來

sed -i ‘/Red Hat Enterprise Linux Server release 6.5 (Santiago)/s/^/#/‘ /etc/redhat-releasesed -i ‘a Red Hat Enterprise Linux Server release 5.0 (Tikanga)‘ /etc/redhat-release


8、關閉SELinux、防火牆

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

防火牆通過RHEL圖形化管理工具禁用,完成後重啟系統

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.