1.檢查相關軟件包
rpm -qa binutils compat-libstdc++-33 elfutils-libelf elfutils-l
ibelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio
libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-de
vel pdksh-5.2.14
安裝相關軟件包
yum -y install binutils compat-libstdc++-33 elfutils-libelf elfutils-l
ibelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio
libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-de
vel pdksh-5.2.14
2.創建相關用戶和組
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle #設置oracle密碼
3.設置相關係統變量
vi /home/oracle/.bash_profile
umask 022
export ORACLE_BASE=/u01/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=ORCL
export PATH=$PATH:HOME/bin:$ORACLE_HOME/bin
vi /etc/sysctl.conf
fs.suid_dumpable = 1
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 = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
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 pam_limits.so
vi /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
4.創建相關目錄
mkdir -p /u01/app/
chown -R oracle:oinstall /u01/app/
5.解壓軟件包到 /u01目錄
unzip linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip
mv database/* /u01
6.上傳或編輯自動響答文件 --附件
7.安裝
chmod -R 775 /u01/app
chown -R oracle.oinstall /u01
su - oracle
cd /u01
./runInstaller -silent -force -responseFile /u01/response/db_install.rsp
centos 6 需要運行./runInstaller -silent -ignorePrereq -responseFile /u01/response/db_install.rsp
提示用root帳號運行兩個sheel腳本表示安裝完成
另開一個終端運行下面兩個腳本
sh /u01/app/oracle/oraInventory/orainstRoot.sh
sh /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
安裝監聽
$ORACLE_HOME/bin/netca -silent -responsefile /u01/response/netca.rsp
安裝實列(運行會不斷閃不管它直接輸入兩遍密碼過一段時間會出現進度百分比)
$ORACLE_HOME/bin/dbca /silent /responsefile /u01/response/dbca.rsp
再安裝個OEM
emca -config dbcontrol db -repos recreate