在RedHat LInux5上安裝Oracle 10g db

ogam發表於2010-12-12

1、硬體需求
# grep MemTotal /proc/meminfo
MemTotal: 1035244 kB

# grep SwapTotal /proc/meminfo
SwapTotal: 4192956 kB

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 141G 2.1G 132G 2% /
/dev/sda1 99M 11M 84M 11% /boot
tmpfs 497M 0 497M 0% /dev/shm

2、核心需求
# uname -a
Linux student 2.6.18-128.el5 #1 SMP Wed Dec 17 11:42:39 EST 2008 i686 i686 i386 GNU/Linux

[@more@]

3、安裝需要的系統包
rpm -q gcc-c++ gcc libstdc++-devel glibc-devel glibc-headers libgomp libXp compat-gcc-34 compat-gcc-34-c++ compat-libstdc++-33 sysstat(OEL5 only)


由於缺失的包之間有嚴格的依賴關係,所以必須按照如下順序安裝缺失的包
rpm -Uvh compat-db-4*
rpm -Uvh libaio-0*
rpm -Uvh compat-libstdc++-33-3*
rpm -Uvh glibc-headers-2.5-12.i386.rpm
rpm -Uvh glibc-devel-2.5-12.i386.rpm
rpm -Uvh compat-gcc-34-3*
rpm -Uvh compat-gcc-34-c++-3*
rpm -Uvh libXp-1*
rpm -Uvh openmotif-2*
rpm -Uvh gcc-4*
rpm -Uvh glibc-2.5-12.i686.rpm
rpm -Uvh libgomp-4.1.1-52.el5.i386.rpm
rpm -Uvh gcc-4.1.1-52.el5.i386.rpm

安裝完成後仍然提示部分包沒有安裝,不過不影響使用
package compat-gcc is not installed
package compat-gcc-c++ is not installed
package compat-libstdc++ is not installed
package compat-libstdc++-devel is not installed


4、修改系統核心引數/etc/sysctl.conf --核心引數配置不正確,在安裝軟體時檢查會提示警告
kernel.shmall = 2097152
kernel.shmmax = 536870912  
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
/sbin/sysctl -p

5、修改/etc/hosts檔案
127.0.0.1 localhost
192.168.0.176 linux5


6、修改/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

7、修改/etc/pam.d/login
session required /lib/security/pam_limits.so

8、修改/etc/profile
if [ $USER = "oracle" ]; then
ulimit -u 16384
ulimit -n 65536
fi


10、建立使用者、組
groupadd oinstall -g 201
groupadd dba -g 202
groupadd oper -g 203
useradd oracle -u 200 -g oinstall -G dba,oper
passwd oracle

11、編輯ORACLE環境變數
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/sbin

12、安裝檔案上傳
將安裝檔案DBTABASE上傳到LINUX系統目錄下/home/oracle
# scp database.tar 192.168.0.10:/home/oracle

13、建立目錄
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01

更改執行許可權
# chown –R oracle:oinstall /home/oracle/database
# chmod 775 /home/oracle/database/runInstaller
# chmod –R 775 /home/oracle/database/install


1.1.1.6 執行安裝
# XHOST +
{如果是LUNUX機器操作LINUX (192.168.0.173)伺服器,在客戶端機器上使用命令:
[root@localhost ~]# ssh -X oracle@192.168.0.173
Linux5>xclock
}

# su – oracle
$ ./runInstaller
(如果需要跳過檢測,就用$./runInstaller -ignoreSysPrereqs;或者vi /etc/redhat-release
Red Hat Enterprise Linux Server release 5 (Tikanga) 替換成 redhat-4;
如果漢字為亂碼,就用 export LANG=en)

安裝ORACLE 10.2.0.1 SOFTWARE--&gt安裝10.2.0.4補丁--&gtdbca安裝資料庫例項。

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

相關文章