IT貓撲網(wǎng):您身邊最放心的安全下載站! 最新更新|軟件分類|軟件專題|手機版|論壇轉(zhuǎn)貼|軟件發(fā)布

您當(dāng)前所在位置:首頁數(shù)據(jù)庫Oracle → oracle數(shù)據(jù)庫安裝預(yù)環(huán)境一鍵處理腳本

oracle數(shù)據(jù)庫安裝預(yù)環(huán)境一鍵處理腳本

時間:2015/6/28來源:IT貓撲網(wǎng)作者:網(wǎng)管聯(lián)盟我要評論(0)

  #!/bin/bash

  #增加安裝oracle所需的用戶和組

  groupadd oinstall

  groupadd dba

  useradd -g oinstall -G dba -d /home/oracle -m oracle

  #創(chuàng)建安裝Oracle所需的目錄

  mkdir -p /u01/app/oracle/product/10.2.0/db_1

  chmod -R 775 /u01

  chown -R oracle:oinstall /u01

  #改變Oracle參數(shù)

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

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

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

  echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf

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

  echo "net.core.rmem_max=262144" >> /etc/sysctl.conf

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

  echo "net.core.wmem_max=262144" >> /etc/sysctl.conf

  /sbin/sysctl -p

  #設(shè)置Oracle環(huán)境變量

  echo "ORACLE_BASE=/u01/app/oracle" >> /home/oracle/.bash_profile

  echo "ORACLE_HOME=\$ORACLE_BASE/product/10.2.0/db_1" >> /home/oracle/.bash_profile

  echo "ORACLE_SID=cmtest" >> /home/oracle/.bash_profile

  echo "PATH=\$PATH:\$HOME/bin:\$ORACLE_HOME/bin" >> /home/oracle/.bash_profile

  echo "LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/usr/lib" >> /home/oracle/.bash_profile

  echo "export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH" >> /home/oracle/.bash_profile

  source /home/oracle/.bash_profile

  #設(shè)置Oracle用戶shell limit

  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

  #修改Linux版本號

  cp /etc/redhat-release /etc/redhat-release.`date -I`.bak

  echo "redhat-4" > /etc/redhat-release

  #修改/etc/hosts文件

  cp /etc/hosts /etc/hosts.`date -I`.bak

  echo "# Do not remove the following line, or various programs" > /etc/hosts

  echo "# that require network functionality will fail." >> /etc/hosts

  echo "`ifconfig eth0 |grep "inet addr" |cut -d: -f2 |cut -d" " -f1`  `more /etc/sysconfig/network | grep HOSTNAME | cut -c10-`  localhost" >> /etc/hosts

  echo "127.0.0.1 `more /etc/sysconfig/network | grep HOSTNAME | cut -c10-`" >> /etc/hosts

  #yum安裝必要包

  yum -y install setarch-2*  make-3*  glibc-2*  libaio-0*  compat-libstdc++-33-3*  compat-gcc-34-3*  compat-gcc-34-c++-3*  gcc-4*  libXp-1*  openmotif-2*  compat-db-4*

關(guān)鍵詞標(biāo)簽:oracle,數(shù)據(jù)庫

相關(guān)閱讀

文章評論
發(fā)表評論

熱門文章 Oracle中使用alter table來增加,刪除,修改列Oracle中使用alter table來增加,刪除,修改列oracle中使用SQL語句修改字段類型-oracle修oracle中使用SQL語句修改字段類型-oracle修使用低權(quán)限Oracle數(shù)據(jù)庫賬戶得到管理員權(quán)限使用低權(quán)限Oracle數(shù)據(jù)庫賬戶得到管理員權(quán)限Oracle對user的訪問控制Oracle對user的訪問控制

相關(guān)下載

人氣排行 ORACLE SQL 判斷字符串是否為數(shù)字的語句Oracle中使用alter table來增加,刪除,修改列的語法ORACLE和SQL語法區(qū)別歸納(1)oracle grant 授權(quán)語句如何加速Oracle大批量數(shù)據(jù)處理Oracle刪除表的幾種方法ORACLE修改IP地址后如何能夠使用Oracle 10g創(chuàng)建表空間和用戶并指定權(quán)限