修改dbca.rsp
响应文件中的重要参数
su - oracle
cd response/
vim dbca.rsp
本次安装过程中设置了下列参数:(注意下面参数视情况而定,不要照抄,原文件都有说明的)
RESPONSEFILE_VERSION ="11.2.0" #不能更改
OPERATION_TYPE ="createDatabase"
GDBNAME ="orcl" #数据库的名字
SID ="ORCL" ##对应的实例名字
TEMPLATENAME ="General_Purpose.dbc" ##建库用的模板文件
SYSPASSWORD ="oracle" ##SYS管理员密码
SYSTEMPASSWORD ="oracle" ##SYSTEM管理员密码
SYSMANPASSWORD= "oracle"
DBSNMPPASSWORD= "oracle"
DATAFILEDESTINATION =/opt/oracle/oradata ##数据文件存放目录
RECOVERYAREADESTINATION=/opt/oracle/flash_recovery_area ##恢复数据存放目录
CHARACTERSET ="ZHS16GBK" ##字符集,重要!!!建库后一般不能更改,所以建库前要确定清楚。
TOTALMEMORY ="1638" #1638MB,物理内存2G*80%。
我的配置
RESPONSEFILE_VERSION ="11.2.0" #不能更改
OPERATION_TYPE ="createDatabase"
GDBNAME ="orcl" #数据库的名字
SID ="orcl" ##对应的实例名字
TEMPLATENAME ="General_Purpose.dbc" ##建库用的模板文件
SYSPASSWORD ="oracle" ##SYS管理员密码
SYSTEMPASSWORD ="password" ##SYSTEM管理员密码
SYSMANPASSWORD= "password"
DBSNMPPASSWORD= "password"
DATAFILEDESTINATION =/data/u01/app/oracle/oradata ##数据文件存放目录
RECOVERYAREADESTINATION=/data/u01/app/oracle/fast_recovery_area ##恢复数据存放目录
CHARACTERSET ="AL32UTF8" ##字符集,重要!!!建库后一般不能更改,所以建库前要确定清楚。
TOTALMEMORY ="2048" #1638MB,物理内存2G*80%。
查看oracle监听和启动oracle监听
#切换oracle用户
su - oracle
#查看oracle监听的启动状态
lsnrctl status
#启动oracle监听
lsnrctl start
操作记录:
[root@localhost ~]# su - oracle
Last login: Sun Feb 23 18:41:44 CST 2020 on pts/6
[oracle@localhost ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-FEB-2020 19:13:08Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listenerTNS-12560: TNS:protocol adapter errorTNS-00511: No listenerLinux Error: 111: Connection refused
[oracle@localhost ~]$ ll
total 0
drwxr-xr-x. 3 oracle oinstall 18 Feb 23 16:28 oradiag_oracle
drwxr-xr-x. 2 oracle oinstall 82 Feb 23 18:43 response
[oracle@localhost ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-FEB-2020 19:13:41Copyright (c) 1991, 2009, 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.1.0 - Production
Log messages written to /data/u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 23-FEB-2020 19:13:41
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /data/u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@localhost ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-FEB-2020 19:13:47Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 23-FEB-2020 19:13:41
Uptime 0 days 0 hr. 0 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /data/u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
The listener supports no services
The command completed successfully