ORACLE11G静默安装手册

ORACLE11G静默安装手册

添加组和用户

groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle

下载安装介质 下载并解压到/home/oracle/database

修改hosts

/etc/hosts
172.172.172.97 wfzj97

关闭selinux

vi /etc/selinux/config
SELINUX=disabled

setenforce 0
getenforce

关闭firewalld

systemctl stop firewalld
systemctl disable firewalld

修改内核参数

vi /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 1073741824
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
sysctl -p

修改/etc/security/limits.conf

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

修改/etc/pam.d/login文件

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

修改/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

创建安装目录

mkdir -p /app/oracle/product/11.2.0
mkdir /app/oracle/oradata
mkdir /app/oracle/inventory
mkdir /app/oracle/fast_recovery_area
chown -R oracle:oinstall /app/oracle
chmod -R 775 /app/oracle

安装依赖

yum -y install gcc make binutils gcc-c++ compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf-devel-static elfutils-libelf-devel ksh libaio libaio-devel numactl-devel sysstat unixODBC unixODBC-devel pcre-devel

设置Oracle用户环境变量

su - oracle
vim .bash_profile

添加:

ORACLE_BASE=/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0
ORACLE_SID=orcl
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

编辑静默安装响应文件

vi /home/oracle/database/response/db_install.rsp

oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=gongxm
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/app/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/app/oracle/product/11.2.0
ORACLE_BASE=/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true

静默安装oracle

./runInstaller -silent -ignorePrereq -ignoreSysPrereqs -responseFile /home/oracle/database/response/db_install.rsp

执行root用户脚本 切回root

sh /app/oracle/inventory/orainstRoot.sh
sh /app/oracle/product/11.2.0/root.sh

配置监听

su - oracle
netca -silent -responseFile /home/oracle/database/response/netca.rsp

修改dbca静默安装配置

vi /home/oracle/database/response/dbca.rsp

GDBNAME = "orcl"
SID = "orcl"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
SYSMANPASSWORD = "oracle"
DBSNMPPASSWORD = "oracle"
DATAFILEDESTINATION =/app/oracle/oradata
RECOVERYAREADESTINATION=/app/oracle/fast_recovery_area
CHARACTERSET = "ZHS16GBK"
TOTALMEMORY = "1638"

静默配置dbca

dbca -silent -responseFile /home/oracle/database/response/dbca.rsp

安装完成检查

lsnrctl status
sqlplus / as sysdba

作者:bluexiii 链接:https://www.jianshu.com/p/67ee288c2838 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×