在Linux上如何安装Oracle数据库

Oracle数据库安装

卸载数据库

  1. 进入vm, edit->virture network editor->type=readonly的IP:192.168.253.10
  2. 用SecureSRC / putty访问
  3. 用root oracle登入
  4. lsnrctl start
  5. sqlplus / sysdba
  6. startup
  7. 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 

  1. ./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

 

正常关闭数据库:

  1. su –oracle
  2. stop dbconsole
  3. sqlplus / as sysdba
  4. shutdown immediate
  5. lsnrctl stop
  6. reboot

 

再进入VM

  1. lsnrctl start
  2. sqlplus / as sysdba
  3. start dbconsole

posted on 2013-01-15 15:26  Alice Sun  阅读(424)  评论(0编辑  收藏  举报

导航