在CentOS 5.5安裝Oracle 11.2 |
發(fā)布時(shí)間: 2012/9/18 17:24:05 |
1.安裝 CentOS 5.5 i386,全部默認(rèn)安裝,關(guān)閉SELinux,關(guān)閉防火墻。 2.檢查rpm包 # rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n"|\ egrep "binutils|compat-libstdc++|elfutils-libelf|gcc|glibc|kernel-headers|ksh|libaio|libgcc|libgomp|libstdc|make|sysstat|unixODBC|pdksh"|sort-
執(zhí)行以下命令(注,如所缺的不止這些包,請另行再安裝,所要的包可以參考Oracle的標(biāo)準(zhǔn)安裝文檔) mount -r -t iso9660 /dev/cdrom /media cd /media/CentOS rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm rpm -ivh elfutils-libelf-devel-0.137-3.el5.i386.rpm elfutils-libelf-devel-static-0.137-3.el5.i386.rpm rpm -ivh libstdc++-devel-4.1.2-48.el5.i386.rpm rpm -ivh kernel-headers-2.6.18-194.el5.i386.rpm rpm -ivh glibc-headers-2.5-49.i386.rpm rpm -ivh glibc-devel-2.5-49.i386.rpm rpm -ivh libgomp-4.4.0-6.el5.i386.rpm rpm -ivh glibc-devel-2.5-49.i386.rpm rpm -ivh gcc-4.1.2-48.el5.i386.rpm rpm -ivh gcc-c++-4.1.2-48.el5.i386.rpm rpm -ivh libaio-devel-0.3.106-5.i386.rpm rpm -ivh sysstat-7.0.2-3.el5.i386.rpm rpm -ivh unixODBC-2.2.11-7.1.i386.rpm rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm rpm -ivh pdksh-5.2.14-36.el5.i386.rpm 3.修改 /etc/inittab(非必要) gedit /etc/inittab 或 nano /etc/inittab 找到 # Default runlevel. The runlevels used by RHS are: # 0 - halt (Do NOT set initdefault to this) # 1 - Single user mode # 2 - Multiuser, without NFS (The same as 3, if you do not have networking) # 3 - Full multiuser mode # 4 - unused # 5 - X11 # 6 - reboot (Do NOT set initdefault to this) # id:5:initdefault: 將 5 改成 3,即: id:3:initdefault: 4.增加組及用戶 groupadd oinstall groupadd dba useradd -g oinstall -G dba -d /u01/Oracle oracle chown -R Oracle:oinstall u01 passwd Oracle 檢查 nobody 是否存在, id nobody 缺省存在的。如果不存在 # /usr/sbin/useradd -g nobody 5.調(diào)整內(nèi)核參數(shù) nano /etc/sysctl.conf 在最下面加入: # by flexitime : install Oracle 11g 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 ----------------- shmmax 的最少值是 0.5 GB. 但是Oracle推薦的值是 shmmax to 2.0 GB (2147483648) ,這會有更好的性能 6.為 Oracle 用戶設(shè)置 Shell 限制 (全部都是在文件的最下面加入) nano /etc/security/limits.conf # by flexitime : install Oracle 11g Oracle soft nproc 2047 Oracle hard nproc 16384 Oracle soft nofile 1024 Oracle hard nofile 65536 Oracle soft stack 10240 nano /etc/pam.d/login # by flexitime : install Oracle 11g session required pam_limits.so nano /etc/profile # by flexitime : install Oracle 11g if [ $USER = "Oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi nano /etc/csh.login # by flexitime : install Oracle 11g if ( $USER == "Oracle" ) then limit maxproc 16384 limit deors 65536 endif 關(guān)閉SELINUX的工作模式(修改這一項(xiàng)后最好重啟一下操作系統(tǒng)) nano /etc/selinux/config # by flexitime : install Oracle 11g SELINUX=disabled nano /etc/RedHat-release 將CentOS release 5 (Final) 修改成 Red Hat Enterprise Linux AS release 5 (Taroon) (因?yàn)镺racle公司沒推出CentOS版本的oracle) su - Oracle cd ~ nano .bash_profile # by flexitime : install Oracle 11g Oracle_BASE=/u01 Oracle_HOME=$ORACLE_BASE/oracle Oracle_SID=orcl PATH=$Oracle_HOME/bin:$PATH:$HOME/bin export Oracle_BASE ORACLE_HOME ORACLE_SID PATH 7. 修改安裝目錄的權(quán)限 mv database /u01/ cd /u01 chown -R Oracle:oinstall database/ 8.使用Oracle賬號 登陸圖形界面 進(jìn)行安裝 運(yùn)行終端 Terminal cd /u01/database ./runInstaller
本文出自:億恩科技【mszdt.com】 服務(wù)器租用/服務(wù)器托管中國五強(qiáng)!虛擬主機(jī)域名注冊頂級提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |