oracle-11.2.0.4静默安装----RedHat7.5

1.配置/etc/hosts文件和关闭seliux和firewall防火墙

编辑/etc/hosts文件
[[email protected] ~]# vim /etc/hosts
[[email protected] ~]# cat /etc/hosts
192.168.10.50	henry

禁用selinux
[[email protected] ~]# vim /etc/selinux/config
[[email protected] ~]# cat /etc/selinux/config
SELINUX=disabled

关闭防火墙
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# systemctl disable firewalld

2. 检查安装数据库所需要的包

[[email protected] ~]# rpm -q binutils compat-libstdc++-33 elfutils-libelf gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgomp libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel numactl-devel perl-Env elfutils-libelf-devel | grep "not installed"

package compat-libstdc++-33 is not installed
package ksh is not installed
package libaio-devel is not installed
package sysstat is not installed
package unixODBC is not installed
package unixODBC-devel is not installed
package numactl-devel is not installed
package perl-Env is not installed
package elfutils-libelf-devel is not installed

[[email protected] ~]# yum install -y ksh libaio-devel sysstat unixODBC unixODBC-devel numactl-devel perl-Env elfutils-libelf-devel

其中compat-libstdc++-33需手动下载上传安装
[email protected] ~]# rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm

3.创建用户和组

[[email protected] ~]# groupadd oinstall
[[email protected] ~]# groupadd dba
[[email protected] ~]# useradd -g oinstall -G dba oracle
[[email protected] ~]# passwd oracle

4. 系统参数配置

编辑/etc/sysctl.conf

[[email protected] ~]# vim /etc/sysctl.conf
[[email protected] ~]# cat /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 4294967295
kernel.shmall = 268435456
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 = 1048586
[[email protected] ~]# sysctl -p

编辑/etc/security/limits.conf

 [[email protected] ~]# cat /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 

编辑/etc/pam.d/login,新加一行

[[email protected] ~]# cat /etc/pam.d/login
#ORACLE SETTING
session required pam_limits.so 

5.配置oracle用户环境变量

[[email protected] ~]# cat /home/oracle/.bash_profile
umask 022
export ORACLE_SID=PROD1
export ORACLE_BASE=/data/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export TMP=/tmp
export TMPDIR=$TMP
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export EDITOR=vim
export TNS_ADMIN=$ORACLE_HOME/network/admin
export SQLPATH=$ORACLE_HOME/sqlplus/admin
export NLS_LANG="AMERICAN_CHINA.ZHS16GBK"
alias sqlplus=‘rlwrap sqlplus‘
alias rman=‘rlwrap rman‘
alias asmcmd=‘rlwrap asmcmd‘

6. 创建安装目录 

u01是oracle安装目录
[[email protected] ~]# mkdir /data/u01
soft是存放数据库软件的目录
[[email protected] ~]# mkdir /data/soft
[[email protected] ~]# chown -R  oracle:oinstall /data/u01/
[[email protected] ~]# chown -R  oracle:oinstall /data/soft/

7. 重启系统,切换oracle用户安装软件

将数据库软件上传到/data/soft/目录下,解压安装包

[[email protected] ~]$ cd /data/soft/
[[email protected] soft]$ unzip p13390677_112040_Linux-x86-64_1of7.zip && unzip p13390677_112040_Linux-x86-64_2of7.zip
[[email protected] soft]$ ls
database  p13390677_112040_Linux-x86-64_1of7.zip  p13390677_112040_Linux-x86-64_2of7.zip

8. 编辑静默安装的应答文件db_install.rsp,此文件位于/data/soft/database/response/目录下

把应答文件模版db_install.rsp 复制到oracle用户家目录下
[[email protected] soft]$ cd database/
[[email protected] database]$ ls
install  readme.html  response  rpm  runInstaller  sshsetup  stage  welcome.html
[[email protected] database]$ cd response/
[[email protected] response]$ ls
dbca.rsp  db_install.rsp  netca.rsp
[[email protected] response]$ cp db_install.rsp /home/oracle

编辑应答文件
[[email protected] database]$ vim /home/oracle/db_install.rsp
#设置以下内容
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=henry
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/u01/app/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/data/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_BASE=/data/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true

9. 执行静默安装

[[email protected] database]$ ./runInstaller -silent -responseFile /home/oracle/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 14307 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 4095 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-10-28_02-28-55PM. Please wait ...[[email protected] database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
   CAUSE: The Central Inventory is located in the Oracle base.
   ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
You can find the log of this install session at:
 /data/u01/app/oracle/inventory/logs/installActions2019-10-28_02-28-55PM.log
The installation of Oracle Database 11g was successful.
Please check ‘/data/u01/app/oracle/inventory/logs/silentInstall2019-10-28_02-28-55PM.log‘ for more details.

As a root user, execute the following script(s):
	1. /data/u01/app/oracle/inventory/orainstRoot.sh
	2. /data/u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Successfully Setup software.另开个终端,使用root账户按顺序执行上面的两个脚本
[[email protected] ~]# /data/u01/app/oracle/inventory/orainstRoot.sh
Changing permissions of /data/u01/app/oracle/inventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /data/u01/app/oracle/inventory to oinstall.
The execution of the script is complete.
[[email protected] ~]# /data/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Check /data/u01/app/oracle/product/11.2.0/dbhome_1/install/root_henry_2019-10-28_14-36-30.log for the output of root script

10. 编辑静默建库应答文件dbca.rsp

复制建库应答文件dbca.rsp到oracle家目录下
[[email protected] database]$ cp response/dbca.rsp /home/oracle/

[[email protected] database]$ vim /home/oracle/dbca.rsp
GDBNAME = "PROD1"
SID = "PROD1"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "oracle"
DATAFILEDESTINATION =/data/u01/app/oracle/oradata
RECOVERYAREADESTINATION=/data/u01/app/oracle/fast_recovery_area
CHARACTERSET = "AL32UTF8"
DATABASETYPE = "OLTP"
TOTALMEMORY = "2048"

11.执行静默建库

[[email protected] ~]$ dbca -silent -responseFile /home/oracle/dbca.rsp
Copying database files
1% complete
3% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
57% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/data/u01/app/oracle/cfgtoollogs/dbca/PROD1/PROD1.log" for further details.

11. 上传并安装rlwrap包,root用户安装

安装readline-devel包
[[email protected] ~]# yum install -y readline*

解压并安装rlwrap
[[email protected] ~]# tar -zxvf 12-rlwrap-0.37.tar.gz
[[email protected] ~]# cd rlwrap-0.37/
[[email protected] rlwrap-0.37]# ls
aclocal.m4  AUTHORS  BUGS  ChangeLog  completions  config.h.in  configure  configure.ac  COPYING  doc  filters  INSTALL  Makefile.am  Makefile.in  NEWS  PLEA  README  src  test  TODO  tools
[[email protected] rlwrap-0.37]# ./configure
[[email protected] rlwrap-0.37]# make&&make install

12. 配置监听,将配置监听的应答文件netca.rsp复制oracle用户的家目录下,不用做修改

[[email protected] response]$ pwd
/data/soft/database/response
[[email protected] response]$ cp netca.rsp /home/oracle/
[[email protected] response]$ netca -silent -responseFile /home/oracle/netca.rsp 

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/oracle/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control:
      /data/u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
在/data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/目录下会新增listener.ora 和sqlnet.ora两个文件
[[email protected] response]$ cd /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/
[[email protected] admin]$ ls
listener.ora  samples  shrept.lst  sqlnet.ora

[[email protected] admin]$ cat listener.ora
# listener.ora Network Configuration File: /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =            ====>这个字符串就是监听名
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = henry)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /data/u01/app/oracle

这是个动态监听,监听创建后就已启动。启动,停止,查看监听状态。

查看监听状态 (lsnrctl status listen_name),因监听名是默认的LISTENER,所以可省略,若有多个监听,则需要指定监听名查看指定的监听状态
[[email protected] ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-OCT-2019 09:57:37

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                29-OCT-2019 09:29:29
Uptime                    0 days 0 hr. 28 min. 8 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /data/u01/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521)))
Services Summary...
Service "PROD1" has 1 instance(s).
  Instance "PROD1", status READY, has 1 handler(s) for this service...
Service "PROD1XDB" has 1 instance(s).
  Instance "PROD1", status READY, has 1 handler(s) for this service...
The command completed successfully

停止监听(lsnrctl stop listen_name)
[[email protected] ~]$ lsnrctl stop

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-OCT-2019 10:00:10

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully

启动监听(lsnrctl start listen_name)
[[email protected] ~]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-OCT-2019 10:00:46

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Starting /data/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /data/u01/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                29-OCT-2019 10:00:46
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /data/u01/app/oracle/diag/tnslsnr/henry/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=henry)(PORT=1521)))
The listener supports no services
The command completed successfully

13. 登入数据库

[[email protected] ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Tue Oct 29 10:13:50 2019

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> show user;
USER is "SYS"

SQL> show parameter db_name;

NAME				     TYPE		    VALUE
------------------------------------ ---------------------- ------------------------------
db_name 			     string		    PROD1

SQL> select status from v$instance;

STATUS
------------------------
OPEN

原文地址:https://www.cnblogs.com/lczz/p/11754280.html

时间: 2024-08-30 00:48:06

oracle-11.2.0.4静默安装----RedHat7.5的相关文章

Oracle 11.2.0.4静默安装软件和创建数据库

在没有图形界面的情况时,安装Oracle数据库软件和创建数据库就只能使用命令行的方式进行. 本文假设安装的前提条件都已经配置好. 一.静默安装数据库软件 1.准备参数文件 这个参数文件是用于安装软件使用的,里边配置了需要安装的版本.语言.ORACLE_HOME等信息. 这个文件的模版在database/response目录下的db_install.rsp,文件中的各个参数作用参考http://docs.oracle.com/cd/E11882_01/em.112/e12255/oui3_resp

Oracle 11.2.0.1在xp上的静默(slient)安装

环境: XP SP3+Oracle 11.2.0.1 安装Oracle软件及数据库 先找到响应文件模版(一般在安装包的..\database\response下),进行编辑. 先复制一份原模版文件: E:\cry\SOFT\database>copy response/db_install.rsp db_install_cry.rsp response\dbca.rsp response\db_install.rsp response\db_install_cry.rsp response\ne

centos6.8 静默安装 oracle 11.2.0.4

安装环境及系统要求    (下文具体参数值与路径根据自己的环境调整)操作系统:Red Hat Enterprise Linux 6 (x86) 或者CentOS 6 (x64) 数据库:Oracle 11g r2 32-bit for Linux 或者 Oracle 11g r2 64-bit for Linux内存:至少1G的物理内存交换空间:1G的内存推荐设置swap 分区至少为2G硬盘:至少5G硬盘空间配置Linux系统参数进行Oracle的安装 在Root用户下执行以下步骤:前提: 1.

我的淘宝:Ubuntu 14.04.5上安装 Oracle 11.2.0.4 RAC

进入淘宝店铺 教程:Ubuntu 14.04.5上安装 Oracle 11.2.0.4 RAC 请支持下.价格好商量!

我的淘宝:Ubuntu 16.04.2上安装 Oracle 11.2.0.4 RAC

进入淘宝店铺 教程:Ubuntu 16.04.2上安装 Oracle 11.2.0.4 RAC 请支持下.价格好商量!

我的淘宝:Ubuntu 12.04.5上安装 Oracle 11.2.0.4 RAC

进入淘宝店铺 教程:Ubuntu 12.04.5上安装 Oracle 11.2.0.4 RAC 请支持下.价格好商量!

ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档

ORACLE LINUX 6.3 + ORACLE 11.2.0.3 RAC + VBOX安装文档 2015-10-21 12:51 525人阅读 评论(0) 收藏 举报  分类: Oracle RAC 版权声明:本文为博主原创文章,未经博主允许不得转载. VBOX + Oracle Linux 6U3 + ORACLE 11.2.0.3.0 RAC 安装 环境: 虚拟机          VIRTUAL BOX OS                ORACLE LINUX 6.3_X86_64

【翻译自mos文章】在RHEL7 or OEL7上安装oracle 11.2.0.4 db时的要求

在RHEL7 or OEL7上安装oracle 11.2.0.4 db时的要求 来源于: Requirements for Installing Oracle 11.2.0.4 RDBMS on RHEL7 or OL7 64-bit (x86-64) (文档 ID 1962100.1) 适用于: Oracle Database - Standard Edition - Version 11.2.0.4 to 11.2.0.4 [Release 11.2] Oracle Database - E

OEL7.0 上静默安装oracle数据库

OEL7.0 上静默安装oracle数据库 静默安装本人使用的也比较少,基本上不需要使用静默安装.就算是文本安装的系统,也使用Xmanager 来重定向图形化.但是万事总有个例外的,比如在MAC 操作系统上,貌似没有Xmananger , 那该上虚拟机如果只装了文本界面就只能静默安装了,如果再装个图形化那就另一个情况了. 地点: 杭州·滨江 微信公众号:HopToad Email: [email protected] 欢迎转载 转载标注出处:: http://blog.csdn.net/notb