在Linux上如何安装Oracle数据库
Oracle数据库安装
卸载数据库
- 进入vm, edit->virture network editor->type=readonly的IP:192.168.253.10
- 用SecureSRC / putty访问
- 用root oracle登入
- lsnrctl start
- sqlplus / sysdba
- startup
- emctl start dbconsole
8.访问 https://192.168.253.10:1158/em/console/aboutApplication
9.emctl stop dbconsole
10.shutdown immediate
11.exit
12.lsnrctl stop
删除命令
# rm -rf /u01/app/oracle/* /u01/app/oraInventory
# rm -rf /etc/oraInst.loc /etc/oratab /etc/oracle /etc/ora_save_* /var/tmp/.oracle
# rm -f /usr/local/bin/dbhome /usr/local/bin/oraenv /usr/local/bin/coraenv
# rm -rf /tmp/OraInstall* /tmp/.oracle
确认是否删除干净,可再敲一遍
rm -rf /u01/app/oracle/* /u01/app/oraInventory
rm -rf /etc/oraInst.loc /etc/oratab /etc/oracle /etc/ora_save_* /var/tmp/.oracle
rm -f /usr/local/bin/dbhome /usr/local/bin/oraenv /usr/local/bin/coraenv
rm -rf /tmp/OraInstall* /tmp/.oracle
reboot
安装数据库
1.进入VM,用oracle oracle登入
2.startx
3.cd /stage/oracle/
4.unzip linux_11gR2_database_1of2.zip
unzip linux_11gR2_database_2of2.zip
- ./runInstaller
6.system-config-display
7./u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
8. 删除不用的文件,省空间rm -rf /stage/oracle/database
10.netca
安装完成后:
1. https://192.168.253.10:1158/em/console/aboutApplication
2. 用sys oracle登入
3. 点击sys->概要文件->default->口令 把有效天前2行设成UNLIMITED,锁定天数为DEFAULT
4. 可以点击“显示SQL”,查看SQL
5. VM点击suspend,不要poweroff
正常关闭数据库:
- su –oracle
- stop dbconsole
- sqlplus / as sysdba
- shutdown immediate
- lsnrctl stop
- reboot
再进入VM
- lsnrctl start
- sqlplus / as sysdba
- start dbconsole