CentOS下静默安装Oracle 10.2.0.1.0


一 前期过程:下载Oracle for linux (x86),上传至Linux

二,安装前准备:
1,硬件要求,测试只要5G左右的空安装目录空闲空间,内存512mb以上,cpu1.5ghz以上吧.

2,环境要求:检查包,最好机器能上网,也就直接更新以下包,
yum install gcc
yum install make
yum install setarch
yum install openmotif
yum install libgomp
yum install libXP
yum install glibc
基本有这些包就不会出错了

3,内核参数修改:
vi /etc/sysctl.conf

kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

对以上设置生效,/sbin/sysctl -p

vi /etc/security/limits.conf 加入以下内容

* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536

vi /etc/pam.d/login 在后面加入一行,注意对应

session required /lib/security/pam_limits.so

vi /etc/selinux/config --( 禁用SELINUX,安装完后可再还原成原值 ) 将SELINUX设置为
SELINUX=disabled

4,添加用户和组

groupadd dba
useradd -g dba oracle

5,创建oracle安装文件夹,并设置相应权限,假设我要装在/export 这个挂载点下:
mkdir -p /export/oracle/product/10.2.0/db_1
chown -R oracle:dba /export/oracle
chmod 775 /export/oracle

6,设置环境变量
查看用户的shell , 
(1.查看当前使用的shell类型
# echo $SHELL
/usr/bin/bsh
2.改变test用户登陆的默认shell
$ chsh test /usr/bin/ksh 重新登陆后生效 或者使用root用户直接修改/etc/passwd文件
将test:!:1002:1001::/home/test:/usr/bin/bsh修改为
test:!:1002:1001::/home/test:/usr/bin/ksh
3.如果系统没有提供用户想使用的shell类型,那么用户需要自己下载对应的shell并安装,并将该shell加入到如下配置文件中,使之成为系统可用的
shell/etc/shells/etc/security/login.cfg )

确定后根据oracle 用户的默认shell,对默认 shell start-up文件作如下改变,如果是Bourne, Bash, or Korn shell,修改环境变量/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

  如果是c shell,则环境变量文件 /etc/csh.login的修改值如下:
  if ( $USER == "oracle" ) then
  limit maxproc 16384
  limit descriptors 65536
  end if

  • 1
  • 2
  • 下一页

相关内容