时间:2021-07-01 10:21:17 帮助过:38人阅读
10. 编辑静默建库应答文件dbca.rsp
复制建库应答文件dbca.rsp到oracle家目录下 [oracle@henry database]$ cp response/dbca.rsp /home/oracle/ [oracle@henry 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.执行静默建库
[oracle@henry ~]$ 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包 [root@henry ~]# yum install -y readline* 解压并安装rlwrap [root@henry ~]# tar -zxvf 12-rlwrap-0.37.tar.gz [root@henry ~]# cd rlwrap-0.37/ [root@henry 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 [root@henry rlwrap-0.37]# ./configure [root@henry rlwrap-0.37]# make&&make install
12. 配置监听,将配置监听的应答文件netca.rsp复制oracle用户的家目录下,不用做修改
[oracle@henry response]$ pwd /data/soft/database/response [oracle@henry response]$ cp netca.rsp /home/oracle/ [oracle@henry 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两个文件 [oracle@henry response]$ cd /data/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/ [oracle@henry admin]$ ls listener.ora samples shrept.lst sqlnet.ora [oracle@henry 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,所以可省略,若有多个监听,则需要指定监听名查看指定的监听状态 [oracle@henry ~]$ 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) [oracle@henry ~]$ 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) [oracle@henry ~]$ 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. 登入数据库
[oracle@henry ~]$ 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
oracle-11.2.0.4静默安装----RedHat7.5
标签:desc status set sample pen ash parameter char package