CentOS 6.2 X64上64位Oracle 11gR2 靜默安裝

來源:互聯網
上載者:User

CentOS 6.2 X64上64位Oracle11gR2 靜默安裝,靜默設定監聽,靜默建庫親自實踐記錄。

1 安裝前環境:
  作業系統:CetnOS6.2x64 迷你安裝,已配置好網路IP:172.16.2.182,實體記憶體8GB,硬碟100GB。
  已下載: linux.x64_11gR2_database_1of2.zip
     linux.x64_11gR2_database_2of2.zip
     位於目錄/opt/
    
2 準備工作
 root使用者登入後
 #yum install vim       //個人喜好vim編輯各種設定檔,所以先下一個
 #yum install unzip       //下載unzip,用來解壓上述兩個壓縮檔
 #cd /opt         //切換目前的目錄到oracle壓縮檔所在目錄
 #unzip linux.x64_11gR2_database_1of2.zip //解壓
 #unzip linux.x64_11gR2_database_2of2.zip
 解壓後新增一個/opt/database目錄,裡面是解壓後的所有oracle安裝檔案。
 
 在/etc/hosts檔案中增加主機名稱(通過hostname獲得)到迴環IP的映射如下:
 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 oracle11gcentos6.dlxg.gov.cn
 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 oracle11gcentos6.dlxg.gov.cn
  
 #vim /etc/selinux/conf  設定 SELINUX=disabled
 #setenforce 0   //關閉selinux
 #service iptables stop //臨時關閉防火牆
 
3 安裝必須的包
 #yum install gcc
 #yum install make
 #yum install binutils
 #yum install gcc-c++
 #yum install compat-libstdc++-33
 #yum install elfutils-libelf-devel
 #yum install elfutils-libelf-devel-static
 #yum install ksh
 #yum install libaio
 #yum install libaio-devel
 #yum install numactl-devel
 #yum install sysstat
 #yum install unixODBC
 #yum install unixODBC-devel
 #yum install pcre-devel
 
4 準備安裝使用者及使用者組
 #groupadd oinstall
 #groupadd dba
 #useradd -g oinstall -G dba -d /home/oracle oracle
 #passwd oracle          //設定oracle密碼

5 修改核心參數設定檔
 #vim /etc/sysctl.conf 在檔案最後增加
 fs.aio-max-nr = 1048576
 fs.file-max = 6553600
 kernel.shmall = 2097152
 kernel.shmmax = 2147483648
 kernel.shmmni = 4096
 kernel.sem = 250 32000 100 128
 net.ipv4.ip_local_port_range = 1024 65000
 net.core.rmem_default = 262144
 net.core.rmem_max = 4194304
 net.core.wmem_default = 262144
 net.core.wmem_max = 1048586
 儲存檔案。
 #/sbin/sysctl -p          //讓參數生效
 
6 修改使用者的限制檔案
 #vim /etc/security/limits.conf 在檔案後增加
 oracle           soft    nproc           2047
 oracle           hard    nproc           16384
 oracle           soft    nofile          1024
 oracle           hard    nofile          65536
 oracle           soft    stack           10240
 儲存檔案。
 修改/etc/pam.d/login檔案,增加如下:
 session  required   /lib64/security/pam_limits.so  //64為系統,千萬別寫成/lib/security/pam_limits.so,否則導致無法登入
 session     required      pam_limits.so
 修改/etc/profile,增加:
 if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
   ulimit -p 16384
   ulimit -n 65536
  else
   ulimit -u 16384 -n 65536
  fi
 fi

7 建立安裝目錄和設定檔案許可權
 #mkdir /opt/oracle
 #mkdir /opt/oracle/11.2.0  //資料庫系統安裝目錄
 #mkdir /opt/oradata    //資料庫資料安裝目錄
 #mkdir /opt/oradata_back  //資料備份目錄
 #mkdir /home/oracle/inventory //清單目錄
 #chown -R oracle:oinstall /opt/oracle
 #chown -R oracle:oinstall /home/oracle/inventory
 #chomod -R 775 /opt/oracle

  • 1
  • 2
  • 3
  • 4
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.