安裝前的準備工作
1.檢測安裝環境
2.修改系統核心參數
3 創建有權限的操作系統用戶和組
4.設置環境變量
5.創建安裝需要的目錄
6.執行安裝文件開始安裝
1、檢測安裝環境
需要安裝的軟件包
binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 elfutils-libelf-0.125
elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125
gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common-2.5
glibc-devel-2.5 glibc-headers-2.5 kernel-headers-2.6.18
ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106
libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2
make-3.81 numactl-devel-0.9.8.i386 sysstat-7.0.2 unixODBC-2.2.11
unixODBC-devel-2.2.11
在centos下面還需要裝一個pdksh的包
2、修改系統核心參數
需要調整的內核參數:
a.kernel.sem
[root@fenghong ~]# sysctl -a|grep sem
kernel.sem = 250 32000 32 128
[root@fenghong ~]# sysctl -a|grep sem|sed 's/32/100/2'
kernel.sem = 250 32000 100 128 (sed ‘/2’是第二次出現的32)
[root@fenghong ~]# sysctl -a|grep sem|sed 's/32/100/2'>>/etc/sysctl.conf
b.net.ipv4.ip_local_port_range
[root@fenghong ~]# sysctl -a|grep ip_local_port
net.ipv4.ip_local_port_range = 32768 61000
[root@fenghong ~]# sysctl -a|grep ip_local_port|sed -e 's/32768/1024/' -e 's/61/65/'
net.ipv4.ip_local_port_range = 1024 65000(sed當接多個命令-e,默認一個不用加-e)
[root@fenghong ~]# sysctl -a|grep ip_local_port|sed -e 's/32768/1024/' -e 's/61/65/'>>/etc/sysctl.conf
c.net.core.rmem_max
[root@fenghong ~]# sysctl -a|grep rmem_max
net.core.rmem_max = 131071
[root@fenghong ~]# sysctl -a|grep rmem_max|sed 's/131071/262411/'>>/etc/sysctl.conf
d.net.core.rmem_default
[root@fenghong ~]# sysctl -a|grep rmem_d
net.core.rmem_default = 112640
[root@fenghong ~]# sysctl -a|grep rmem_d|sed 's/112640/262144/'
net.core.rmem_default = 262144
[root@fenghong ~]# sysctl -a|grep rmem_d|sed 's/112640/262144/'>>/etc/sysctl.conf
e.net.core.wmem_max
[root@fenghong ~]# sysctl -a|grep wmem_ma
net.core.wmem_max = 131071
[root@fenghong ~]# sysctl -a|grep wmem_ma|sed 's/131071/262144/'>>/etc/sysctl.conf
f.net.core.wmem_default
[root@fenghong ~]# sysctl -a|grep wmem_d
net.core.wmem_default = 112640
[root@fenghong ~]# sysctl -a|grep wmem_d|sed 's/112640/262144/'>>/etc/sysctl.conf
g.fs.file-max
[root@fenghong ~]# sysctl -a|grep file-m
fs.file-max = 100901
[root@fenghong ~]# sysctl -a|grep file-m|sed 's/100901/65526/'>>/etc/sysctl.conf
h.使修改生效
[root@fenghong ~]# sysctl -p
PS:
fs.aio-max-nr = 1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
net.core.wmem_default = 262144
kernel.sem = 250 32000 100 128
3 、創建有權限的操作系統用戶和組
4、設置環境變量
[root@fenghong ~]# vim /home/oracle/.bash_profile
5、創建安裝需要的目錄
[root@fenghong ~]# mkdir -p /feng/oracle
[root@fenghong ~]# chown -R oracle:oinstall /feng/oracle/
6、執行安裝文件開始安裝
[root@fenghong ~]# export DISPLAY=192.168.0.247:0.0
[root@fenghong ~]# xhost +
[root@fenghong ~]# su - oracle
執行安裝文件進行安裝
[root@fenghong database]# ./runInstaller
6、驗證是否安裝成功
建議:
一、[root@fenghong ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.2 (Santiago)
[root@fenghong ~]# sed 's/6/4/' -i /etc/redhat-release (-i 修改源文件)
有些情況下,有些軟件包沒裝,判斷的時候版本太高了,檢查就會失敗...因爲oracle 10g的時候rhel6還沒有出來.. 所以10g中的產品沒包括rhel6系列
二、修改/etc/hosts文件, 添加主機IP和主機名的解析