驗證OS系統需求:
檢查所需安裝的 rpm 有沒有裝好...版本不同沒差.
rpm -qa | grep make-3...以此類推
make-3.80-6.EL4
gcc-3.4.6-3
glibc-2.3.4-2.25
compat-db-4.0.14-5
compat-gcc-32-3.2.3-47.3
compat-gcc-32-c++-3.2.3-47.3
compat-libstdc++-296-2.96-132.7.2
compat-libstdc++-33-3.2.3-47.3
openmotif21-2.1.30-11.RHEL4.6
setarch-1.3-1

+===============================================================+

Installing Oracle 10g on RHEL4 x86 use ASM

# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle

Set the password on the oracle account:

# passwd oracle

Ex:
passwd oracleChanging password for user oracle.
New password:
Retype new password:passwd:
all authentication tokens updated successfully.

# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/
# chmod -R 775 /u01/app/oracle

+===============================================================+

# vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144

# /sbin/sysctl -p

+===============================================================+

# vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

+===============================================================+
# vi /etc/pam.d/login

session required /lib/security/pam_limits.so

+===============================================================+
# vi /etc/profile.d/oracle.sh

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_SID=ora10

PATH=$PATH:$ORACLE_HOME/bin:/usr/bin:/bin:/usr/bin/X11: [->沒換行]
/usr/local/bin:$ORACLE_HOME/common/oracle/bin

ORACLE_TERM=xterm
TNS_ADMIN=$ORACLE_HOME/network/admin

LD_LIBRARY_PATH=$ORACLE_HOME/lib: [->沒換行]
$ORACLE_HOME/oracm/lib:/lib:/usr/lib:/usr/local/lib

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:
$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib


export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERM [->沒換行]
TNS_ADMIN LD_LIBRARY_PATH CLASSPATH

+===============================================================+
建立好 OS使用Disk的Partition

fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde
fdisk /dev/sdf

各 [Enter] 之後的順序

n[Enter]  ->  p[Enter]  ->  1[Enter]  -> [Enter]  -> [Enter]   -> w[Enter]

+===============================================================+
安裝 ASM2.0
請至
http://www.oracle.com/technology/software/tech/linux/asmlib/rhel4.html
下載,並安裝

rpm -Uvh oracleasm-support-2.0.3-1.i386.rpm
rpm -Uvh oracleasm-2.6.9-42.EL-2.0.3-1.i686.rpm
rpm -Uvh oracleasmlib-2.0.2-1.i386.rpm

+===============================================================+
設定ASMLib

# /etc/init.d/oracleasm configure

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y

+--------------------------------------------------------------------------------------------------------+
 | ! mark disks for use by ASMLib by running the following command as root:     |
 |  範例:                                                                                                                                 |
 |  /etc/init.d/oracleasm createdisk DISK_NAME device_name                                |
 |                                                                                                                                            |
+--------------------------------------------------------------------------------------------------------+


# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
# /etc/init.d/oracleasm createdisk VOL2 /dev/sdd1
# /etc/init.d/oracleasm createdisk VOL3 /dev/sde1
# /etc/init.d/oracleasm createdisk VOL4 /dev/sdf1

建立好,執行/etc/init.d/oracleasm listdisks可以看到
VOL1
VOL2
VOL3
VOL4

+===============================================================+
設定ASM相關

用root帳號執行:
/u01/app/oracle/product/10.2.0/db_1/bin/localconfig add

使用GUI介面:

dbca &
選擇設定ASM
*在ASM Disk Groups配置介面,選擇Create New,
會顯示之前通過 ASMlib 建立的4個卷VOL1到VOL4

選擇前三個,VOL1,VOL2,VOL3, Disk group name 輸入 DATA ,
Redundancy , 選擇 Normal, 點擊ok

完成後再次點擊 Create New.
選擇最後一個VOL4 , Disk group name 輸入 FLASH_RECOVERY_AREA  ,
Redundancy 選擇 External,
點擊ok ,完成ASM的 Disk group  建立.


然後再建立 Database 就完成了!

以上僅供參考,也歡迎一起來討論。

arrow
arrow
    全站熱搜

    hsinichi 發表在 痞客邦 留言(0) 人氣()