redhat oracle 12c 安装图解,RedHat 7 静默安装Oracle 12c 您所在的位置:网站首页 oracle12c静默安装db软件 redhat oracle 12c 安装图解,RedHat 7 静默安装Oracle 12c

redhat oracle 12c 安装图解,RedHat 7 静默安装Oracle 12c

2023-09-15 06:34| 来源: 网络整理| 查看: 265

之前在网上看了很多Oracle的静默安装教程,感觉有些乱,经过自己查阅Oracle官网英文手册,结合在虚拟机中安装测试,整理出了这篇RedHat 7 静默安装Oracle 12c。redhat 6静默安装Oracle 11g R2也已基本整理好了,等有时间了再发出来。

一、环境要求与准备

1、硬件要求

(1)磁盘空间

EnterpriseEdition : 6.4GB

StandardEdition : 6.1GB

1 GB of space inthe  /tmp directory on your Linux system.

(2)RAM

Minimum: 1 GB of RAM

Recommended: 2 GB ofRAM or more

(3)SWAP

RAM                                                    Swap Space

Between 1 GB and 2 GB——1.5 times the size of the RAM

Between2 GB and 16 GB——Equal to the size of the RAM

Morethan 16 GB——16 GB

2、软件要求

(1)操作系统

■Supported OracleLinux 7 and Red Hat Enterprise Linux 7 Distributions for x86-64

■ Supported OracleLinux 6 and Red Hat Enterprise Linux 6 Distributions for x86-64

■ Supported OracleLinux 5 and Red Hat Enterprise Linux 5 Distributions for x86-64

■ Supported SUSEDistributions for x86-64

Starting with Oracle Database 12c Release 1 (12.1.0.2), Red HatEnterprise Linux 7(3.10.0-54.0.1.el7.x86_64)are supported on Linuxx86-64 systems.

(2)RPM包要求forRH7

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

unixODBC-2.3.1 orlater

3、设置域名解析

4、关闭Transparent HugePages

使用root登录

查看:cat /sys/kernel/mm/redhat_transparent_hugepage/enabled

关闭方法:

官方推荐关闭,但Redhat 7我还未找到关闭方法,但也不影响安装

5、创建用户和组

Thefollowing local operating system groups and users are required if you areinstalling Oracle Database:

■ The OracleInventory group (typically,  oinstall )

■ The OSDBA group(typically,  dba )

■ The Oraclesoftware owner (typically,  oracle )

■ The OSOPER group(optional. Typically,  oper )

# grep dba/etc/group

# id oracle

If the  oracle user exists:

# /usr/sbin/usermod-g oinstall -G dba oracle

If the  oracle user does not exist:

# /usr/sbin/useradd-g oinstall -G dba oracle

set the password:

# passwd oracle

255e21d0abd57a4e471fa4f5784c0483.png

6、创建安装目录

Oracle_Base目录:/u01/app/oracle/

Oracle_Home目录:/u01/app/oracle/12c

Oracle清单目录:/u01/app/oracle/oraInventory

0d18f3b2733a1de7396046d69a6c61f4.png

7、设置资源限制

e9a3c3eafb074d29a41f3e79ee6d131d.png

查看方式:

$ ulimit -Sn

1024

$ ulimit -Hn

65536

$ ulimit -Su

2047

$ ulimit -Hu

16384

$ ulimit -Ss

10240

$ ulimit -Hs

32768

修改方法:

vi /etc/security/limits.conf,加上以下内容:

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle hard stack 32768

oracle soft stack 10240

注:如果Oracle已登录,必须先登出后再次登录才生效

8、配置Oracle用户环境变量

vi /home/oracle/.bash_profile,加上以下内容,标橙色的部分需要根据自己实际进行修改

export EDITOR=vi

export ORACLE_SID=orcl

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/12c

export nls_date_format="yyyy-mm-dd hh24:mi:ss"

export PATH=/u01/app/oracle/12c/bin:$PATH

9、配置内核参数

b6190bb9afa1eeb0d7629c0005534974.png

Note:If the current value for any parameter is greater than the valuelisted in this table, then the Fixupscripts do not change the value of  that parameter.

查看方式:

53a145b2172b76caa90ff534832d8d89.png

修改方式:vi  /etc/sysctl.conf,修改或增加以下内容:

fs.aio-max-nr =1048576

fs.file-max =6815744

kernel.shmall =2097152

kernel.shmmax =4294967295

kernel.shmmni = 4096

kernel.sem = 25032000 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

最好reboot一下,不然有的参数不生效

10、编辑/etc/profile

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

fi

二、静默安装Oracle software

1、编辑应答文件db_install.rsp

Oracle安装介质中有应答文件,复制一份出来进行修改,更改以下内容,标橙色部分需要根据自己实际修改,应答文件中的其他内容不需要改,Oracle版本:12.1.0.2

本文原始出处:江健龙的技术博客http://jiangjianlong.blog.51cto.com/3735273/1792451

oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=rh7

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/u01/app/oracle/12c

ORACLE_BASE=/u01/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall

oracle.install.db.BACKUPDBA_GROUP=dba

oracle.install.db.DGDBA_GROUP=dba

oracle.install.db.KMDBA_GROUP=dba

DECLINE_SECURITY_UPDATES=true

2、执行静默安装命令

[oracle@rh7

database]$ ./runInstaller -silent -ignorePrereq -responseFile

/oracle12czip/db_install.rsp

1e7521baa87f412ec46c7090a677942f.png

3、完成安装后使用root登录执行脚本

8f756c52644049850cd874539ce3053b.png

4、配置监听

复制一份安装介质中的应答文件netca.rsp,无需修改,直接静默执行即可

[oracle@rh7

oracle12czip]$ netca -silent -responseFile /oracle12czip/netca.rsp

c4ef128e719b74fb62fa4b128f6f98f6.png

三、静默安装数据库

1、编辑应答文件dbca.rsp

Oracle安装介质中有应答文件dbca.rsp,复制一份出来进行修改,更改以下内容,标橙色部分需要根据自己实际修改,应答文件中的其他内容不需要改

[GENERAL]

RESPONSEFILE_VERSION

= "12.1.0"

OPERATION_TYPE =

"createDatabase"

[CREATEDATABASE]

GDBNAME ="orcl"

SID =

"orcl"

TEMPLATENAME =

"General_Purpose.dbc"

SYSPASSWORD ="p@ssw0rd"

SYSTEMPASSWORD ="p@ssw0rd"

EMCONFIGURATION ="DBEXPRESS"

EMEXPRESSPORT = "5520"#(指定该参数安装后未生效,仍是默认的5500)

DBSNMPPASSWORD ="p@ssw0rd"

STORAGETYPE="FS"

CHARACTERSET =

"ZHS16GBK"

NATIONALCHARACTERSET=

"AL16UTF16"

MEMORYPERCENTAGE ="40"

TOTALMEMORY ="1024"

2、执行静默安装命令

$dbca -silent

-responseFile /oracle12czip/dbca.rsp

efd21bd166e03368c7ec3a5e647952c0.png

四、安装完成后检查

1、检查监听状态:$ lsnrctl status

b0b323b4b287d2fd1310ef813fb8f358.png

2、检查Oracle进程:]$ ps -ef

|grep ora_ |grep -v grep

35a987217ddcfd6e2f1f8263bd66b7ba.png

3、登录Oracle数据库

c0584d67f3fd17e9d002e63e1bf033ad.png

SQL> select name

from V$database;

4e0971fe0ba7cf22e9d05ebeff35d646.png

SQL>

select instance_name from V$instance;

3d16ff7e3d998152ed8d51d11eaa9d27.png

SQL>

select name from V$datafile;

3997a1ef32c88105dd1bf156d5bfe122.png

SQL>  select userenv('language') from dual;

a38f3b4de883351bcd887bfe8eb8d9c4.png

SQL> select *

from product_component_version;

ba71db53d21a60f03e9d6ed79230bc73.png

SQL>

show parameter background_dump_dest;

5fc3ec8cf237b1a3810c6aa7514c255f.png

4、登录EM

bf44afcbbdb387d956aa0985fbd303cb.png

362fd4bf7d0fa6e00ee6fd9d9f292286.png

Oracle 12c至此已在redhat 7上静默安装完成了,可以创建表空间、创建用户去使用了。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有