linux实战小笔记(十五)Centos7下静默安装Oracle 11g(无图形化界面)

oracle.install.db.OPER_GROUP=dba

10. 开始安装

=========

su - oracle

cd /data/database

./runInstaller -silent -responseFile /data/etc/db_install.rsp -ignorePrereq

安装期间可以使用tail命令监看oracle的安装日志

#日志文件名称根据自己的实际执行时间变更

tail -f /data/app/oracle/inventory/logs/installActions2019-01-02_06-03-30PM.log

安装完成后有如下提示,如果有类似如下提示,说明安装完成

The following configuration scripts need to be executed as the “root” user.

#!/bin/sh

#Root scripts to run

/u01/app/oraInventory/orainstRoot.sh

/u01/app/oracle/product/11.2.0/db_1/root.sh

To execute the configuration scripts:

  1. Open a terminal window

  2. Log in as “root”

  3. Run the scripts

  4. Return to this window and hit “Enter” key to continue

Successfully Setup Software.

11. 使用root用户执行脚本

===================

su - root

sh /data/app/oracle/inventory/orainstRoot.sh

sh /data/app/oracle/product/11.2.0/root.sh

12. 配置监听程序

===========

su - oracle

netca /silent /responsefile /data/etc/netca.rsp

#输出结果

[oracle@oracledb ~]$ netca /silent /responsefile /data/etc/netca.rsp

Parsing command line arguments:

Parameter “silent” = true

Parameter “responsefile” = /data/etc/netca.rsp

Done parsing command line arguments.

Oracle Net Services Configuration:

Profile configuration complete.

Oracle Net Listener Startup:

Running Listener Control:

/data/app/oracle/product/11.2.0/bin/lsnrctl start LISTENER

Listener Control complete.

Listener started successfully.

Listener configuration complete.

Oracle Net Services configuration successful. The exit code is 0

查看监听端口

netstat -tnpl | grep 1521

13. 静默创建数据库

============

编辑应答文件/data/etc/dbca.rsp

[GENERAL]

RESPONSEFILE_VERSION = “11.2.0”

OPERATION_TYPE = “createDatabase”

[CREATEDATABASE]

GDBNAME = “orcl”

SID = “orcl”

SYSPASSWORD = “oracle”

SYSTEMPASSWORD = “oracle”

SYSMANPASSWORD = “oracle”

DBSNMPPASSWORD = “oracle”

DATAFILEDESTINATION =/data/app/oracle/oradata

RECOVERYAREADESTINATION=/data/app/oracle/fast_recovery_area

CHARACTERSET = “AL32UTF8”

TOTALMEMORY = “1638”

执行静默建库

su - oracle

dbca -silent -responseFile /data/etc/dbca.rsp

执行过程如下

[oracle@oracledb ~]$ dbca -silent -responseFile /data/etc/dbca.rsp

Copying database files

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

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/app/oracle/cfgtoollogs/dbca/orcl/orcl.log” for further details.

查看进程

ps -ef | grep ora_ | grep -v grep

执行结果

[oracle@oracledb ~]$ ps -ef | grep ora_ | grep -v grep

oracle 19304 1 0 18:33 ? 00:00:00 ora_pmon_orcl

oracle 19306 1 0 18:33 ? 00:00:00 ora_vktm_orcl

oracle 19310 1 0 18:33 ? 00:00:00 ora_gen0_orcl

oracle 19312 1 0 18:33 ? 00:00:00 ora_diag_orcl

oracle 19314 1 0 18:33 ? 00:00:00 ora_dbrm_orcl

oracle 19316 1 0 18:33 ? 00:00:00 ora_psp0_orcl

oracle 19318 1 0 18:33 ? 00:00:00 ora_dia0_orcl

oracle 19320 1 0 18:33 ? 00:00:00 ora_mman_orcl

oracle 19322 1 0 18:33 ? 00:00:00 ora_dbw0_orcl

oracle 19324 1 0 18:33 ? 00:00:00 ora_lgwr_orcl

oracle 19326 1 0 18:33 ? 00:00:00 ora_ckpt_orcl

oracle 19328 1 0 18:33 ? 00:00:00 ora_smon_orcl

oracle 19330 1 0 18:33 ? 00:00:00 ora_reco_orcl

oracle 19332 1 0 18:33 ? 00:00:00 ora_mmon_orcl

oracle 19334 1 0 18:33 ? 00:00:00 ora_mmnl_orcl

oracle 19336 1 0 18:33 ? 00:00:00 ora_d000_orcl

oracle 19338 1 0 18:33 ? 00:00:00 ora_s000_orcl

oracle 19361 1 0 18:34 ? 00:00:00 ora_qmnc_orcl

oracle 19376 1 0 18:34 ? 00:00:00 ora_cjq0_orcl

oracle 19396 1 0 18:34 ? 00:00:00 ora_q000_orcl

oracle 19398 1 0 18:34 ? 00:00:00 ora_q001_orcl

查看监听状态

$ lsnrctl status

#结果

[oracle@oracledb ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 02-JAN-2019 18:36:15

Copyright © 1991, 2009, Oracle. All rights reserved.

Connecting to (DESCRIPT

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值