在CentOS 5.5安裝Oracle 11.2 |
發(fā)布時間: 2012/9/17 17:22:37 |
1.安裝 CentOS 5.5 i386,全部默認安裝,關閉SELinux,關閉防火墻。 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的標準安裝文檔) 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.調整內核參數(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 用戶設置 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 關閉SELINUX的工作模式(修改這一項后最好重啟一下操作系統(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) (因為Oracle公司沒推出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. 修改安裝目錄的權限 mv database /u01/ cd /u01 chown -R Oracle:oinstall database/ 8.使用Oracle賬號 登陸圖形界面 進行安裝 運行終端 Terminal cd /u01/database ./runInstaller
本文出自:億恩科技【mszdt.com】 |