Linux静默安装Oracle

环境准备:
1、主机名:
vim /etc/sysconfig/network

2、本地域名解释
vim /etc/hosts

#################必要的依赖####################################
yum install binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh ksh

1、yum install libaio-devel

2、cd /mnt/Packages/
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm

3、yum install elfutils-libelf-devel

4、上传 pdksh-5.2.14-37.el5_8.1.i386
yum install pdksh-5.2.14-37.el5_8.1.i386.rpm

###############################################################

一、
vim /etc/sysctl.conf

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2936870912
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 = 1048576
net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304

注意注释掉

Disable netfilter on bridges.

#net.bridge.bridge-nf-call-ip6tables = 0
#net.bridge.bridge-nf-call-iptables = 0
#net.bridge.bridge-nf-call-arptables = 0

二、修改:
vim /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard stack 10240

三、重启系统

四、创建用户

userdel -r oracle
groupadd -g 700 oinstall
groupadd -g 701 dba
useradd -g oinstall -G dba -u 700 oracle

五、为Oracle安装创建目录

mkdir -p /u01/app/oracle
chown -R oracle.dba /u01/app
chmod -R 777 /u01/app
mkdir /u01/app/oraInventory
chown -R oracle:dba /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory

六、设置用户变量

su - oracle
vim ~/.bashrc

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.1/db_1
export ORACLE_OWNER=oracle
export ORACLE_SID=orcl
export ORACLE_TERM=xterm
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
umask 022

七、
vim /etc/pam.d/login

session required /lib64/security/pam_limits.so
session required pam_limits.so

八、安装oracle软件
1、上传
2、安装

开始静默安装
./runInstaller -silent -ignoreSysPrereqs -showProgress -responseFile /home/oracle/db_install.rsp

根据提示执行脚本

  1. /u01/app/oracle/oraInventory/orainstRoot.sh
  2. /u01/app/oracle/product/11.2.0.1/db_1/root.sh

创建监听器
netca -silent -responsefile /home/oracle/netca.rsp

创建数据库
dbca -silent -responseFile /home/oracle/dbca.rsp

猜你喜欢

转载自blog.51cto.com/setchio/2327106
0条评论
添加一条新回复