在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

转载于:https://www.cnblogs.com/alicesunBlog/archive/2013/01/15/2861279.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值