码迷,mamicode.com
首页 > 数据库 > 详细

RHEL7.5 静默安装(silent mode)oracle11gr2数据库软件

时间:2019-11-01 11:18:27      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:core   libs   group   strong   关闭selinux   c++   awk   用户和组   silent   

参考官方文档 Database Quick Installation Guide for Linux x86-64,https://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm

https://www.cnblogs.com/nucdy/p/5603998.html

https://www.cnblogs.com/lightnear/p/8036159.html

0.修改host文件和主机名及关闭SeLinux

[root]

sed -i ‘3,$d‘ /etc/hosts

echo ‘192.0.2.10     std.example.com     std‘>>/etc/hosts

hostnamectl --static set-hostname std

vi /etc/selinux/config 修改

SELINUX=disabled

1.安装依赖软件

[root]

binutils-2.23.52.0.1-12.el7.x86_64 

compat-libcap1-1.10-3.el7.x86_64 

compat-libstdc++-33-3.2.3-71.el7.i686

compat-libstdc++-33-3.2.3-71.el7.x86_64

gcc-4.8.2-3.el7.x86_64 

gcc-c++-4.8.2-3.el7.x86_64 

glibc-2.17-36.el7.i686 

glibc-2.17-36.el7.x86_64 

glibc-devel-2.17-36.el7.i686 

glibc-devel-2.17-36.el7.x86_64 

ksh

libaio-0.3.109-9.el7.i686 

libaio-0.3.109-9.el7.x86_64 

libaio-devel-0.3.109-9.el7.i686 

libaio-devel-0.3.109-9.el7.x86_64 

libgcc-4.8.2-3.el7.i686 

libgcc-4.8.2-3.el7.x86_64 

libstdc++-4.8.2-3.el7.i686 

libstdc++-4.8.2-3.el7.x86_64 

libstdc++-devel-4.8.2-3.el7.i686 

libstdc++-devel-4.8.2-3.el7.x86_64 

libXi-1.7.2-1.el7.i686 

libXi-1.7.2-1.el7.x86_64 

libXtst-1.2.2-1.el7.i686 

libXtst-1.2.2-1.el7.x86_64 

make-3.82-19.el7.x86_64 

sysstat-10.1.5-1.el7.x86_64

--7.5

yum -y install binutils binutils-devel compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libaio libaio.i686 libaio-devel libaio-devel.i686 libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libXi libXi.i686 libXtst libXtst.i686 make sysstat unixODBC unixODBC-devel

--6.5

yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 make sysstat unixODBC unixODBC.i686 unixODBC-devel unixODBC-devel.i686

2.创建用户和组

[root]

groupadd oinstall

groupadd dba

useradd oracle -g oinstall -G dba

passwd oracle

vi /etc/profile 末尾加上

if [ \$USER = "oracle" ];then

        if [ \$SHELL = "/bin/ksh" ];then

                ulimit -p 16384

                ulimit -n 65536

        else

                ulimit -u 16384 -n 65536

        fi

        umask 022

fi

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/

export ORACLE_SID=std1

export PATH=$ORACLE_HOME/bin:$PATH

3.修改内核

[root]

[root@localhost ~]# MEMTOTAL=$(free -b | sed -n ‘2p‘ | awk ‘{print $2}‘) 

[root@localhost ~]# SHMMAX=$(expr $MEMTOTAL / 2)

[root@localhost ~]# SHMMNI=4096

[root@localhost ~]# PAGESIZE=$(getconf PAGE_SIZE)

[root@localhost ~]# cat >> /etc/sysctl.conf << EOF

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmmax = $SHMMAX

kernel.shmall = $(expr \( $SHMMAX / $PAGESIZE \) \* \( $SHMMNI / 16 \))

kernel.shmmni = $SHMMNI

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

EOF

[root@localhost ~]# sysctl -p

modprobe bridge
lsmod|grep bridge

/etc/security/limits.conf最后加上

oracle  soft  nproc   2047

oracle  hard  nproc   16384

oracle  soft  nofile  1024

oracle  hard  nofile  65536

oracle  soft  stack   10240

oracle  hard  stack   32768

4.创建需要的目录

[root]

mkdir -p /u01/app/oracle

mkdir -p /u01/app/oraInventory

chown -R oracle:oinstall /u01/app/

chmod -R 775 /u01/app/

5.静默安装

[oracle]

cat db_install.rsp

#仅安装oracle软件

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=edw

UNIX_GROUP_NAME=dba

INVENTORY_LOCATION=/u01/app/oraInventory

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1

ORACLE_BASE=/u01/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.isCustomInstall=true

oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

DECLINE_SECURITY_UPDATES=true

安装

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

完成后root执行/u01/app/oracle/oraInventory/orainstRoot.sh    /u01/app/oracle/product/11.2.0/db_1/root.sh

或者dbca安装

修改<unzip path>/database/stage/cvu/cv/admin 目录下的

cvu_config文件

将其中的

CV_ASSUME_DISTID=OEL4

改为

CV_ASSUME_DISTID=OEL6

./runInstaller -jreLoc /usr/lib/jvm/jre1.8.0_191

ps.安装oracle环境配置工具    可以自动安装依赖软件、修改内核参数、创建用户和组

yum -y install oracle-rdbms-server-11gR2-preinstall

RHEL7.5 静默安装(silent mode)oracle11gr2数据库软件

标签:core   libs   group   strong   关闭selinux   c++   awk   用户和组   silent   

原文地址:https://www.cnblogs.com/yongestcat/p/11775745.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!