在CentOS 5.5安装Oracle 11.2 |
发布时间: 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-
执行以下命令(注,如所缺的不止这些包,请另行再安装,所要的包可以参考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.调整内核参数 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的工作模式(修改这一项后最好重启一下操作系统) 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
本文出自:亿恩科技【www.enkj.com】 |