在Oracle Linux 6.6下安裝Oracle 11g

hooca發表於2015-06-08
OS:Oracle Linux 6.6 64bit
DB:11.2.0.4

為伺服器建立LVM,分別存放Oracle_HOME, Data, FRA

點選(此處)摺疊或開啟

  1. pvcreate /dev/sdb
  2. pvcreate /dev/sdc

  3. vgcreate vg00 /dev/sdb /dev/sdc

  4. lvcreate -L 30G -n orahome vg00
  5. lvcreate -L 40G -n oradata vg00
  6. lvcreate -L 50G -n fra vg00

  7. mke2fs -t ext4 /dev/vg00/orahome
  8. mke2fs -t ext4 /dev/vg00/oradata
  9. mke2fs -t ext4 /dev/vg00/fra
安裝RPM

在Oracle Linux 6中,只需要一條命令即可安裝所有Oracle需要的RPM包

點選(此處)摺疊或開啟

  1. yum -y install oracle-rdbms-server-11gR2-preinstall
接下來,
IP地址,DNS,主機名,/etc/hosts

組和使用者

點選(此處)摺疊或開啟

  1. #只需要建立oper組
  2. groupadd oper

  3. usermod -g oinstall -G dba,oper oracle
  4. passwd oracle
建立必需的目錄

點選(此處)摺疊或開啟

  1. mkdir -p /u01/app/oracle
  2. chown -R oracle:oinstall /u01 /oradata /fra
  3. chmod -R 775 /u01 /oradata /fra
oracle使用者環境變數

點選(此處)摺疊或開啟

  1. # Oracle env settings
  2. export TMP=/tmp
  3. export TMPDIR=$TMP
  4. export ORACLE_BASE=/u01/app/oracle
  5. export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
  6. export ORACLE_SID=red
  7. export ORACLE_PATH=/u01/app/oracle/common/oracle/sql
  8. export ORACLE_TERM=xterm
  9. export TNS_ADMIN=$ORACLE_HOME/network/admin
  10. export PATH=$ORACLE_HOME/bin:${JAVA_HOME}/bin:/u01/app/common/oracle/bin:$PATH:/usr/local/sbin:/usr/local/bin
  11. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/oracm/lib:$ORACLE_HOME/ctx/lib:/lib:/usr/lib:/usr/local/lib
  12. export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
  13. export SQLPATH=~/admin/sql:$ORACLE_HOME/sqlplus/admin
  14. export LANG="en_US.UTF-8"
  15. export NLS_LANG='american_america.zhs16gbk'
  16. export NLS_DATE_FORMAT='yyyy-mm-dd hh24:mi:ss'
vi /etc/pam.d/login
增加一行

點選(此處)摺疊或開啟

  1. session    required     /lib64/security/pam_limits.so
vi /etc/profile

點選(此處)摺疊或開啟

  1. if [ $USER = "oracle" ]; then
  2.         if [ $SHELL = "/bin/ksh" ]; then
  3.               ulimit -p 16384
  4.               ulimit -n 65536
  5.         else
  6.               ulimit -u 16384 -n 65536
  7.         fi
  8. fi
配置使用者資源限制

點選(此處)摺疊或開啟

  1. # Oracle-Validated setting for nofile soft limit is 131072
  2. oracle soft nofile 131072

  3. # Oracle-Validated setting for nofile hard limit is 131072
  4. oracle hard nofile 131072

  5. # Oracle-Validated setting for nproc soft limit is 131072
  6. oracle soft nproc 131072

  7. # Oracle-Validated setting for nproc hard limit is 131072
  8. oracle hard nproc 131072

  9. # Oracle-Validated setting for core soft limit is unlimited
  10. oracle soft core unlimited

  11. # Oracle-Validated setting for core hard limit is unlimited
  12. oracle hard core unlimited

  13. # Oracle-Validated setting for memlock soft limit is 50000000
  14. oracle soft memlock 50000000

  15. # Oracle-Validated setting for memlock hard limit is 50000000
  16. oracle hard memlock 50000000

依次執行
runInstaller
netca
dbca


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22621861/viewspace-1691932/,如需轉載,請註明出處,否則將追究法律責任。

相關文章