【DBCA -SILENT】静默方式安装11gR2 oracle数据库软件

【DBCA -SILENT】静默方式安装11gR2数据库软件单实例

BLOG文档结构图

【DBCA -SILENT】静默方式安装11gR2 oracle数据库软件 

 

 

 

相关文章链接:

 

  DBCA静默方式建库 :http://blog.itpub.net/26736162/viewspace-1448220/

【DBCA -SILENT】静默安装如何启用归档模式:http://blog.itpub.net/26736162/viewspace-1585925/

【DBCA -SILENT】静默安装之rac数据库安装:http://blog.itpub.net/26736162/viewspace-1586352/

 

 

 

数据库:11.2.0.3

OS:RHEL6.5

 

 

 

最近一直在研究oracle的静默方式,觉得挺好的,免去了图形界面的方式,今天我们来看看单实例的oracle数据库软件的静默安装方式,rac的数据库软件安装后边再补上吧。

一、 安装前的准备工作  

 

安装前的准备工作和图形界面的安装无异,都是配置。。。

1、 检查硬件    

 

注意这里的内存应该满足要求,不然可能引起数据库在安装过程中长时间的挂起等待。。。。

在正式安装开始前,请先检查你的软硬件条件是否满足安装需要。

 

1. 查看系统物理内存,以下输出可以看出,有2G的内存,内存最低要求1G

[root@rhel6 tmp]# grep MemTotal /proc/meminfo

MemTotal:        1914492 kB

2. 查看交换空间大小,以下输出可以看出,有2G的交换空间,交换空间的最优设置与你物理内存大小相关,详细说明请参考安装文档

[root@rhel6 tmp]# grep SwapTotal /proc/meminfo

SwapTotal:       1015800 kB

 

3.查看可用物理内存和交换空间

[root@rhel6 tmp]# free

             total       used       free     shared    buffers     cached

Mem:       1914492    1558568     355924          0      79604    1092996

-/+ buffers/cache:     385968    1528524

Swap:      1015800     170592     845208

4.查看挂载的临时分区空间情况

[root@rhel6 tmp]#  df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda2        48G   29G   17G  63% /

tmpfs           935M  228K  935M   1% /dev/shm

/dev/sda1       291M   39M  238M  14% /boot

.host:/         331G  309G   22G  94% /mnt/hgfs

/dev/sr0        3.6G  3.6G     0 100% /media/RHEL_6.5 x86_64 Disc 1

[root@rhel6 tmp]#

 

 

2、 检查软件    

 

 

1.查看Linux版本

[root@rhel6 tmp]# cat /etc/issue

Red Hat Enterprise Linux Server release 6.5 (Santiago)

Kernel \r on an \m

2.查看内核版本

[root@rhel6 tmp]# uname -a

Linux rhel6.5 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

 

 

3、 修改host文件    

永久生效:

[root@rhel6 tmp]# more /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=orcltest

[root@rhel6 tmp]#                                                               

 

 

查看/etc/hosts文件中必须包含a fully qualified name for the server

[root@rhel6 tmp]# cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.59.129 orcltest

[root@rhel6 tmp]#

 

 

4、 安装软件包检查  

 

可以统一检查:

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 \
elfutils-libelf-devel

 

 

我们可以看到没有安装过的包会已is not installed 出现:

[root@rhel6_lhr ~]# 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

binutils-2.20.51.0.2-5.36.el6.x86_64

compat-libstdc++-33-3.2.3-69.el6.x86_64

compat-libstdc++-33-3.2.3-69.el6.i686

elfutils-libelf-0.152-1.el6.x86_64

gcc-4.4.7-4.el6.x86_64

gcc-c++-4.4.7-4.el6.x86_64

glibc-2.12-1.132.el6.x86_64

glibc-common-2.12-1.132.el6.x86_64

glibc-devel-2.12-1.132.el6.x86_64

glibc-headers-2.12-1.132.el6.x86_64

package ksh is not installed

libaio-0.3.107-10.el6.x86_64

libaio-devel-0.3.107-10.el6.x86_64

libaio-devel-0.3.107-10.el6.i686

libgomp-4.4.7-4.el6.x86_64

libgcc-4.4.7-4.el6.x86_64

libstdc++-4.4.7-4.el6.x86_64

libstdc++-devel-4.4.7-4.el6.x86_64

libstdc++-devel-4.4.7-4.el6.i686

make-3.81-20.el6.x86_64

sysstat-9.0.4-22.el6.x86_64

unixODBC-2.2.14-12.el6_3.x86_64

unixODBC-2.2.14-12.el6_3.i686

unixODBC-devel-2.2.14-12.el6_3.i686

unixODBC-devel-2.2.14-12.el6_3.x86_64

package numactl-devel is not installed

[root@rhel6_lhr ~]#

 

如果部分包不存在

可以批量更新安装,但如果依赖关系缺失,可能需要多执行两遍

或者手工调整

 

 

 

5、 内核参数--shell限制  

 

 

 

①、 limits.conf

 

为了优化性能,需要添加 oracle 用户 3 个限制参数:

[root@localhost ~]# vi /etc/security/limits.conf

 

为oracle用户设置Shell限制,修改/etc/security/limits.conf,加入

[root@oracle ~]# vi /etc/security/limits.conf

oracle           soft    nproc   2047

oracle           hard    nproc   16384

oracle           soft    nofile  1024

oracle           hard    nofile  65536

 

 

②、 login

 

修改/etc/pam.d/login,加入

[root@oracle ~]# vim /etc/pam.d/login

session    required     pam_limits.so

 

③、 profile

[root@oracle ~]# vim /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

 

 

④、 sysctl.conf

 

Configuring Kernel Parameters for Linux

vim /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 4294967296

kernel.shmmax = 4294967295

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

 

生效

# /sbin/sysctl -p

⑤、 关闭selinux

 

vi /etc/selinux/config

 

SELINUX=disabled

 

6、 关闭防火墙  

关闭防火墙

chkconfig iptables off   ---永久

/etc/init.d/iptables status 

7、 新建用户和组    

The Oracle Inventory group (oinstall)  数据库安装组

The OSDBA group (dba)  数据库管理员组

The Oracle software owner (oracle)  管理员用户

 

 

groupadd oinstall

groupadd dba

groupadd oper

useradd -g oinstall -G dba -m  oracle

passwd oracle

 

[root@oracle ~]# groupadd oinstall

[root@oracle ~]# groupadd dba

[root@oracle ~]# useradd -g oinstall -G dba -m  oracle

[root@oracle ~]# passwd oracle

 

-m 表示为用户oracle 新建一个根目录
-g 表示为用户指定一个主group
-G 表示为用户指定一个副group
这样oracle既属于oinstall组也属于dba组。
平时主要是oinstall组发生作用。

 

 

8、 新建安装目录    

ROOT执行:

mkdir  -p  /u02/app/oracle/product/11.2.0/dbhome_1

chown -R  oracle:oinstall  /u02

chmod  -R  775  /u02

 

 

 

9、 新建/etc/oraInst.loc    

在/etc目录下创建一个名为 oraInst.loc 的文件,文件中的内容(两行代码)如下:
inventory_loc=$ORACLE_BASE/oraInventory
inst_group= oinstall

[root@ORCLTEST ~]# vi /etc/oraInst.locinventory_loc=/u02/app/oracle/oraInventoryinst_group= oinstall 

4. 输入下面的命令在oraInst.loc文件上设置合适的拥有者,组和权限:

[root@ORCLTEST ~] chown oracle:oinstall /etc/oraInst.loc[root@ORCLTEST ~] chmod 664 /etc/oraInst.loc

 

 

10、 设置环境变量    

 

Vi ~/.bash_profile  增加如下内容:

 

export EDITOR=vi

export ORACLE_SID=orcltest

export ORACLE_BASE=/u02/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib

export PATH=$ORACLE_HOME/bin:$PATH

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib

 

umask 022

 

#export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export SQLPATH=$ORACLE_HOME/sqlplus/admin

 

 

 

 

 

 

二、 开始安装    

 

1、 准备oracle安装文件    

 

解压oracle安装文件包

 

[oracle@rhel6 tmp]$ ll

total 2442088

drwxr-x---. 2 grid   oinstall       4096 Jan  6 00:10 hsperfdata_grid

drwxr-x---. 2 oracle oinstall       4096 Jan  6 00:36 hsperfdata_oracle

drwxr-xr-x. 2 root   root           4096 Jan  5 23:49 hsperfdata_root

drwx------. 2 oracle oinstall       4096 Jan  5 22:08 keyring-5qr0Bb

drwx------. 2 gdm    gdm            4096 Jan  5 22:08 orbit-gdm

drwx------. 2 oracle oinstall       4096 Apr 21 09:26 orbit-oracle

-rwxr-xr-x. 1 oracle oinstall 1358454646 Apr 21 09:35 p10404530_112030_Linux-x86-64_1of7.zip

-rwxr-xr-x. 1 oracle oinstall 1142195302 Apr 21 09:36 p10404530_112030_Linux-x86-64_2of7.zip

drwx------. 2 oracle oinstall       4096 Jan  5 22:08 pulse-LbDtLtLYhc91

drwx------. 2 root   root           4096 Apr  8 17:40 vmware-root-2083271499

[oracle@rhel6 tmp]$

[oracle@rhel6 tmp]$ unzip  p10404530_112030_Linux-x86-64_1of7.zip  && unzip p10404530_112030_Linux-x86-64_2of7.zip

 

。。。。。。。。。。。。。。。

 

 

 

 

2、 执行静默安装    

 

修改解压后的安装文件夹下response下面的db_install.rsp文件,将相关的参数设置为如下:

ORACLE_HOSTNAME=192.168.59.129

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u02/app/oracle/oraInventory

SELECTED_LANGUAGES=en,zh_CN

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

ORACLE_BASE=/u02/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.EEOptionsSelection=false

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oper

oracle.install.db.isRACOneInstall=false

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

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

oracle.installer.autoupdates.option=SKIP_UPDATES

 

 

然后执行安装:

[oracle@ORCLTEST database]$ cd /tmp/database

[oracle@ORCLTEST database]$ ./runInstaller -silent -noconfig -responseFile /tmp/database/response/db_install.rsp -ignoreSysPrereqs -ignorePrereq

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 20781 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 796 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-04-21_12-09-17PM. Please wait ...[oracle@ORCLTEST database]$ [WARNING] [INS-13014] Target environment do not meet some optional requirements.

   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u02/app/oracle/oraInventory/logs/installActions2015-04-21_12-09-17PM.log

   ACTION: Identify the list of failed prerequisite checks from the log: /u02/app/oracle/oraInventory/logs/installActions2015-04-21_12-09-17PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

You can find the log of this install session at:

/u02/app/oracle/oraInventory/logs/installActions2015-04-21_12-09-17PM.log

The installation of Oracle Database 11g was successful.

Please check '/u02/app/oracle/oraInventory/logs/silentInstall2015-04-21_12-09-17PM.log' for more details.

 

As a root user, execute the following script(s):

        1. /u02/app/oracle/product/11.2.0/dbhome_1/root.sh

 

 

Successfully Setup Software.

 

[oracle@ORCLTEST database]$

 

 

安装时后台进程

[root@ORCLTEST dbhome_1]# ps -ef|grep install

oracle   45527     1 48 12:09 pts/5    00:00:46 /tmp/OraInstall2015-04-21_12-09-17PM/jdk/jre/bin/java -Doracle.installer.library_loc=/tmp/OraInstall2015-04-21_12-09-17PM/oui/lib/linux64 -Doracle.installer.oui_loc=/tmp/OraInstall2015-04-21_12-09-17PM/oui -Doracle.installer.bootstrap=TRUE -Doracle.installer.startup_location=/tmp/database/install -Doracle.installer.jre_loc=/tmp/OraInstall2015-04-21_12-09-17PM/jdk/jre -Doracle.installer.nlsEnabled="TRUE" -Doracle.installer.prereqConfigLoc=  -Doracle.installer.unixVersion=2.6.32-431.el6.x86_64 -mx150m -cp /tmp/OraInstall2015-04-21_12-09-17PM::/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/prov_fixup.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/log4j-core.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/instcommon.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/instdb.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/orai18n-utility.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/emConfigInstall.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/orai18n-mapping.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/cvu.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/remoteinterfaces.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/OraPrereqChecks.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/ojdbc5.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/emagentSDK.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/installcommons_1.0.0b.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/ssh.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/jsch.jar:/tmp/OraInstall2015-04-21_12-09-17PM/ext/jlib/OraPrereq.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraInstaller.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/oneclick.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/xmlparserv2.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/share.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraInstallerNet.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/emCfg.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/emocmutl.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraPrereq.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/jsch.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ssh.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/remoteinterfaces.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/http_client.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraSuiteInstaller.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatch.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatchactions.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatchprereq.jar:../stage/Components/oracle.swd.opatch/11.2.0.3.0/1/DataFiles/jlib/opatchutil.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/OraCheckPoint.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstImages.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_de.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_es.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_fr.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_it.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_ja.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_ko.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_pt_BR.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_zh_CN.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/InstHelp_zh_TW.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/oracle_ice.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/help4.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/help4-nls.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ewt3.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ewt3-swingaccess.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/ewt3-nls.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/swingaccess.jar::/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/jewt4.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/jewt4-nls.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/orai18n-collation.jar:/tmp/OraInstall2015-04-21_12-09-17PM/oui/jlib/orai18n-mapping.jar:/tmp/OraInstall2015-04-21_12-09

root     46585 45299  0 12:10 pts/12   00:00:00 grep install

[root@ORCLTEST dbhome_1]#

 

文件大小:

[root@ORCLTEST dbhome_1]# du . -sh

4.1G    .

[root@ORCLTEST dbhome_1]#

 

 

Root脚本:

[root@ORCLTEST ~]# /u02/app/oracle/product/11.2.0/dbhome_1/root.sh

Check /u02/app/oracle/product/11.2.0/dbhome_1/install/root_ORCLTEST_2015-04-21_12-16-26.log for the output of root script

[root@ORCLTEST ~]# more  /u02/app/oracle/product/11.2.0/dbhome_1/install/root_ORCLTEST_2015-04-21_12-16-26.log

 

Performing root user operation for Oracle 11g

 

The following environment variables are set as:

    ORACLE_OWNER= oracle

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

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@ORCLTEST ~]#

 

至此,数据库软件静默安装完成。

如果安装错误,可以删除目录(rm -rf /u02)然后重新创建目录再执行命令创建。

 

rm -rf /u02

mkdir  -p  /u02/app/oracle/product/11.2.0/dbhome_1

chown -R  oracle:oinstall  /u02

chmod  -R  775  /u02

 

 

3、 Dbca静默方式建库  

 

 

[oracle@orcltest database]$ strings $ORACLE_HOME/assistants/dbca/templates/General_Purpose.dbc | grep -i arch

         true

[oracle@orcltest database]$

[oracle@ORCLTEST oracle]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname orcltest -sid orcltest -sysPassword lhr -systemPassword lhr -responseFile NO_VALUE -datafileDestination /u02/app/oracle/oradata/ -redoLogFileSize 50 -recoveryAreaDestination /u02/app/oracle/flash_recovery_area -storageType FS -characterSet ZHS16GBK -nationalCharacterSet AL16UTF16 -sampleSchema true -memoryPercentage 20 -totalMemory 200 -databaseType OLTP -emConfiguration NONE

1% complete

3% complete

11% complete

18% complete

26% 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 "/u02/app/oracle/cfgtoollogs/dbca/orcltest/orcltest.log" for further details.

[oracle@orcltest database]$ more /u02/app/oracle/cfgtoollogs/dbca/orcltest/orcltest.log

Copying database files

DBCA_PROGRESS : 1%

DBCA_PROGRESS : 3%

DBCA_PROGRESS : 11%

DBCA_PROGRESS : 18%

DBCA_PROGRESS : 26%

DBCA_PROGRESS : 37%

Creating and starting Oracle instance

DBCA_PROGRESS : 40%

DBCA_PROGRESS : 45%

DBCA_PROGRESS : 50%

DBCA_PROGRESS : 55%

DBCA_PROGRESS : 56%

DBCA_PROGRESS : 57%

DBCA_PROGRESS : 60%

DBCA_PROGRESS : 62%

Completing Database Creation

DBCA_PROGRESS : 66%

DBCA_PROGRESS : 70%

DBCA_PROGRESS : 73%

DBCA_PROGRESS : 85%

DBCA_PROGRESS : 96%

DBCA_PROGRESS : 100%

Database creation complete. For details check the logfiles at:

/u02/app/oracle/cfgtoollogs/dbca/orcltest.

Database Information:

Global Database Name:orcltest

System Identifier(SID):orcltest

 

[oracle@ORCLTEST oracle]$ ORACLE_SID=orcltest

[oracle@orcltest database]$ sqlplus / as sysdba

 

SQL*Plus: Release 11.2.0.3.0 Production on Tue Apr 21 15:41:57 2015

 

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

 

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> show parameter name

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_file_name_convert                 string

db_name                              string      orcltest

db_unique_name                       string      orcltest

global_names                         boolean     FALSE

instance_name                        string      orcltest

lock_name_space                      string

log_file_name_convert                string

processor_group_name                 string

service_names                        string      orcltest

SQL> archive log list;

Database log mode              Archive Mode

Automatic archival             Enabled

Archive destination            USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     4

Next log sequence to archive   6

Current log sequence           6

SQL>

 

三、 静默配置监听    

通过response文件运行netca, 生成sqlnet.ora和listener.ora文件, 位于$ORACLE_HOME/network/admin目录下:

# su - oracle

$ $ORACLE_HOME/bin/netca /silent /responsefile /u01/database/netca.rsp

$ ll $ORACLE_HOME/network/admin/*.ora

$ lsnrctl status

 

 

[oracle@orcltest admin]$ netca -silent -responsefile $ORACLE_HOME/assistants/netca/netca.rsp

 

Parsing command line arguments:

    Parameter "silent" = true

    Parameter "responsefile" = /u02/app/oracle/product/11.2.0/dbhome_1/assistants/netca/netca.rsp

Done parsing command line arguments.

Oracle Net Services Configuration:

Warning: Oracle Restart is not running.

Listener configuration will not be registered/unregistered with Oracle Restart.

Profile configuration complete.

Oracle Net Listener Startup:

    Running Listener Control:

      /u02/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

[oracle@orcltest admin]$

[oracle@orcltest admin]$ cd $ORACLE_HOME/network/admin

[oracle@orcltest admin]$ ll

total 20

-rw-r--r-- 1 oracle oinstall  379 Apr 21 16:33 listener.ora

drwxr-xr-x 2 oracle oinstall 4096 Apr 21 16:02 samples

-rw-r--r-- 1 oracle oinstall  205 May 11  2011 shrept.lst

-rw-r--r-- 1 oracle oinstall  223 Apr 21 16:33 sqlnet1504214PM3315.bak

-rwxr-xr-x 1 oracle oinstall  223 Apr 21 16:33 sqlnet.ora

[oracle@orcltest admin]$

 

 

成功运行后在$ORACLE_HOME/network/admin目录下生成sqlnet.ora和listener.ora两个文件。 

上一篇:使用默认模式-PDO::ERRMODE_SILENT


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