fantlam 发表于 2013-1-28 22:23:33

Suse Enterprise 11 安装Oracle 11.2(二)

作者:fantlam  转载请注明原文出处:http://www.linuxsight.com/blog/829
 
接着上一篇文章 Suse Enterprise 11 安装Oracle 11.2(上)
继续oracle的安装。本来以为我之前有安装的经验,本次可以很顺利就通过的。而原来suse和centos还是有一点小差别,因此没能很快就完成安装,当中卡在几个问题上。
我们继续按应有的步骤进行下去
检查系统硬件
如图,利用linux命令检查系统是否满足要求。
内存1G以上 交换空间1.5G以上 磁盘空间16G
 
 http://www.linuxsight.com/wp-content/uploads/pic/2010/0821/1.jpg
修改linux内核参数
检查内核参数是否满足
 
http://www.linuxsight.com/wp-content/uploads/pic/2010/0821/2.jpg 
 /etc/sysctl.conf 加上如下内容
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
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
 
# /sbin/chkconfig boot.sysctl on  让suse启动时加载/etc/sysctl.conf
# /sbin/sysctl –p   使修改的参数立即生效
 
http://www.linuxsight.com/wp-content/uploads/pic/2010/0821/3.jpg 
创建oracle用户和组及安装目录
linuxsight:/# groupadd oinstall   (创建用户组oinstall)
linuxsight:/#  groupadd dba(创建用户组dba)
 
linuxsight:/#  useradd –g oinstall –G dba –m oracle ( 第一个问题就在这里,必须加 -m )
[linuxsight:/#  passwd oracle(设置密码)
linuxsight:/#  mkdir –p /fantlam/oracle 
linuxsight:/#  chown -R oracle:oinstall /fantlam(改目录组)
 
linuxsight:/#  su – oracle
oracle@linuxsight:/home/oracle> vi .profile 添加
 
ORACLE_BASE=/fantlam
ORACLE_HOME=$ORACLE_BASE/oracle
ORACLE_SID=fantlam
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
 
oracle@linuxsight:/home/oracle> exit (退出登录让设置生效)
linuxsight:/# su – oracle
oracle@linuxsight:/home/oracle> env | grep ORA
ORACLE_SID=fantlam
ORACLE_BASE=/fantlam
ORACLE_HOME=/fantlam/oracle
 
 
 
为oracle用户设置shell的限制
1、gedit /etc/security/limits.conf 加入如下内容
oracle soft nproc  2047
oracle hard nproc  16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard stack  10240
http://www.linuxsight.com/wp-content/uploads/pic/2010/0821/4.jpg
 
2、gedit /etc/pam.d/login 加入
session required /lib/security/pam_limits.so
 
3、gedit /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
 
http://www.linuxsight.com/wp-content/uploads/pic/2010/0821/5.jpg
 
解压文件并移动到fantlam目录
linuxsight:/# unzip linux_11gR2_database_1of2.zip
linuxsight:/# unzip linux_11gR2_database_2of2.zip
linuxsight:/# mv database/ /fantlam
linuxsight:/# cd /fantlam
linuxsight:/# chown -R oracle:oinstall database/ 
页: [1]
查看完整版本: Suse Enterprise 11 安装Oracle 11.2(二)