一 前期過程:下載Oracle for linux (x86),上傳至Linux
二,安裝前準備:
1,硬體要求,測試只要5G左右的空安裝目錄空閑空間,記憶體512mb以上,cpu1.5ghz以上吧.
2,環境要求:檢查包,最好機器能上網,也就直接更新以下包,
yum install gcc
yum install make
yum install setarch
yum install openmotif
yum install libgomp
yum install libXP
yum install glibc
基本有這些包就不會出錯了
3,核心參數修改:
vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
對以上設定生效,/sbin/sysctl -p
vi /etc/security/limits.conf 加入以下內容
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
vi /etc/pam.d/login 在後面加入一行,注意對應
session required /lib/security/pam_limits.so
vi /etc/selinux/config --( 禁用SELINUX,安裝完後可再還原成原值 ) 將SELINUX設定為
SELINUX=disabled
4,添加使用者和組
groupadd dba
useradd -g dba oracle
5,建立oracle安裝資料夾,並設定相應許可權,假設我要裝在/export 這個掛載點下:
mkdir -p /export/oracle/product/10.2.0/db_1
chown -R oracle:dba /export/oracle
chmod 775 /export/oracle
6,設定環境變數
查看使用者的shell ,
(1.查看當前使用的shell類型
# echo $SHELL
/usr/bin/bsh
2.改變test使用者登陸的預設shell
$ chsh test /usr/bin/ksh 重新登陸後生效 或者使用root使用者直接修改/etc/passwd檔案
將test:!:1002:1001::/home/test:/usr/bin/bsh修改為
test:!:1002:1001::/home/test:/usr/bin/ksh
3.如果系統沒有提供使用者想使用的shell類型,那麼使用者需要自己下載對應的shell並安裝,並將該shell加入到如下設定檔中,使之成為系統可用的
shell/etc/shells/etc/security/login.cfg )
確定後根據oracle 使用者的預設shell,對預設 shell start-up檔案作如下改變,如果是Bourne, Bash, or Korn shell,修改環境變數/etc/profile檔案如下:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
如果是c shell,則環境變數檔案 /etc/csh.login的修改值如下:
if ( $USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
end if