[oracle@tester ~]$ /opt/database/runInstaller -silent -force -responseFile /opt/database/response/db_install.rsp
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 165908 MB Passed
Checking swap space: must be greater than 150 MB. Actual 16383 MB Passed
。。。。。
。。。。。(省略中间警告)
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root scripts to run
/opt/app/oracle/oraInventory/orainstRoot.sh
/opt/app/oracle/product/11.2.0/db_1/root.sh
To execute the configuration scripts:
Open a terminal window
Log in as "root"
Run the scripts
Return to this window and hit "Enter" key to continue
Successfully Setup Software.
安装完毕后会提示上述的信息,按照要求执行上述脚本
新开一个窗口 用root 执行对应脚本
/opt/app/oracle/oraInventory/orainstRoot.sh
/opt/app/oracle/product/11.2.0/db_1/root.sh
然后回到原窗口按enter即可
接着配置监听程序启动监听程勋
[oracle@tester bin]$ $ORACLE_HOME/bin/netca /silent /responseFile /opt/database/response/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /opt/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Listener "LISTENER" already exists.
Oracle Net Services configuration successful. The exit code is 0
启动监控程序
$ /opt/app/oracle/product/11.2.0/db_1/bin/lsnrctl start LISTENER
静默dbca建库
vim /opt/database/response/dbca.rsp
GDBNAME = "ora11g.tester"78 行 全局数据库的名字=SID+主机域名
SID="ora11g" //149行 SID
CHARACTERSET="AL32UTF8" //415行 编码
NATIONALCHARACTERSET="UTF8" //425行 编码
执行建库
[oracle@tester response]$ $ORACLE_HOME/bin/dbca -silent -responseFile /opt/database/response/dbca.rsp
Enter SYS user password:
Enter SYSTEM user password:
sh: /bin/ksh: No such file or directory
sh: /bin/ksh: No such file or directory
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
57% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
74% complete
85% complete
96% complete
100% complete
Look at the log file "/opt/app/oracle/cfgtoollogs/dbca/ora11g/ora11g.log" for further details.
启动数据库(默认等一会儿会自动起)
SQL*Plus:> Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition> With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> start
SP2-1506: START, @ or @@ command has no arguments
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL>
使用show parameter;或者select table_name from dba_tables看看是否
启动监听:lsnrctl start
查看监听:lsnrctl status
停止监听:lsnrctl stop
参考文档:
https://blog.csdn.net/u010469514/article/details/73822099
http://www.boyfuli.com/archives/81
https://blog.csdn.net/h8178/article/details/78251198