在64位redhat5.5上面安裝oracle 11g

sky_dizzy001發表於2014-02-01
1.修改引數:
vi /etc/selinux/config
SELINUX=disabled 

[root@www oracle]# tail -n 6 /etc/security/limits.conf         
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
oracle              soft    stack   1024  

vi /etc/pam.d/login
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_limits.so

Enabling Core File Creatio:
/etc/profile        ulimit –S –c 0 > /dev/null 2>&1   ==> ulimit -S -c unlimited > /dev/null 2>&
      
vi /etc/sysctl.conf                                          
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 104858
kernel.core_uses_pid = 1
fs.suid_dumpable = 1

使用/sbin/sysctl -p命令來讓系統引數修改生效

2.模擬作業系統版本降級(欺騙oracle):
vi /etc/redhat-release
Red Hat Enterprise Linux Server release 4.2 (Tikanga)

3.安裝相應包
用Yum安裝一下包:
修改/etc/yum.repos.d/rhel-debuginfo.repo為如下格式:
[oracle@scdb admin]$ cat /etc/yum.repos.d/rhel-debuginfo.repo 
[Cluster]
name=Red Hat Enterprise
baseurl=file:///software/oracle/temp/Cluster
enabled=1
gpgcheck=0
[ClusterStorage]
name=Red Hat Enterprise  ClusterStorage
baseurl=file:///software/oracle/temp/ClusterStorage
enabled=1
gpgcheck=0
[Server]
name=Red Hat Enterprise  Server
baseurl=file:///software/oracle/temp/Server
enabled=1
gpgcheck=0
[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
baseurl=file:///software/oracle/temp/VT
enabled=1
gpgcheck=0  

其中/software/oracle/temp為系統盤對應目錄
yum -y install  binutils   compat*    elfutils*    gcc*   glibc*   ksh   libaio*   libstdc*     make    numactl*  sysstat*   libXp* 
      
4.增加oracle使用者和組
groupadd -g 501 oinstall
groupadd -g 500 dba
useradd -g oinstall -G dba oracle
passwd oracle
     
5.修改oracle配置檔案
su - oracle
vi .bash_profile 增加以下幾行:
[oracle@scdb ~]$ cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
LANG=C; export LANG
ORACLE_BASE=/software/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10g; export ORACLE_HOME
ORACLE_SID=zsdsdb; export ORACLE_SID
NLS_LANG=AMERICAN_AMERICA.zhs16gbk; export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

6.使用vncserver來圖形介面安裝
在root執行  
[root@scdb ~]# xhost +

7.安裝完畢後需修改listener.ora檔案
修改listener.ora為如下:
[oracle@scdb admin]$ cat listener.ora 
# listener.ora Network Configuration File: /software/oracle/product/10g/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /software/oracle/product/10g)
      (PROGRAM = extproc)
    )
  (SID_DESC =
      (ORACLE_HOME = /software/oracle/product/10g)
      (SID_NAME = zsdsdb)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 150.17.20.202)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

備註:
1. 使用裸裝置建立ASM磁碟方法:
1.1 修改裸裝置屬性:
chown oracle:oinstall /dev/sdf
[root@scdb oracle]# ls -la /dev/sdf
brw-r----- 1 oracle oinstall 8, 81 Jun 30 18:39 /dev/sdf
1.2 在ASM例項裡面修改如下屬性為你建立裸裝置的名稱
SQL> alter system set asm_diskstring='/dev/sdf';

System altered.
1.3 在ASM例項裡面建立磁碟組:
CREATE DISKGROUP DGZSDS  EXTERNAL REDUNDANCY  DISK '/dev/sdf'; 
1.4.修改/etc/rc.local裡面裸裝置的屬性,避免重啟後屬組變化:
[oracle@scdb admin]$ cat /etc/rc.local 
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

chown oracle:oinstall /dev/sdf
touch /var/lock/subsys/local 

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

相關文章