預備:先關閉ORACLE資料庫及監聽,具體方法見:HTTP://blog.csdn.net/zxnlmj/article/details/23096877

 

1、修改HOSTS檔,添加JTWF到本機IP位址的映射:

1.[root@JTWF home]# gedit /etc/hosts

最後一行為添加的:
1.127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
2.::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
3.16.54.136.81 JTWF
2、修改/etc/sysconfig/network添加如下:
1.[root@JTWF home]# gedit /etc/sysconfig/network
2.NETWORKING=yes
3.HOSTNAME=JTWF

 

3、修改listener.ora

1.su oracle

2. 
3.gedit /home/oracle/product/11.2/db_1/network/admin/listener.ora
修改HOST由HOST=localhost改為HOST=JTWF(隨意):

01.# listener.ora Network Configuration File: /home/oracle/product/11.2/db_1/network/admin/listener.ora

02.# Generated by Oracle configuration tools.
03. 
04.LISTENER =
05.(DESCRIPTION_LIST =
06.(DESCRIPTION =
07.(ADDRESS = (PROTOCOL = TCP)(HOST = JTWF)(PORT = 1521))
08.)
09.)
10. 
11.ADR_BASE_LISTENER = /home/oracle
4、tnsnames.ora檔不修改也可,我沒修改

 

1.gedit /home/oracle/product/11.2/db_1/network/admin/tnsnames.ora

 

01.# tnsnames.ora Network Configuration File: /home/oracle/product/11.2/db_1/network/admin/tnsnames.ora
02.# Generated by Oracle configuration tools.
03. 
04.ORCL =
05.(DESCRIPTION =
06.(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
07.(CONNECT_DATA =
08.(SERVER = DEDICATED)
09.(SERVICE_NAME = orcl)
10.)
11.)

 

創作者介紹
創作者 shadow 的頭像
shadow

資訊園

shadow 發表在 痞客邦 留言(0) 人氣()