解决Linux下Oracle Tomcat 8080端口冲突(2)
来源:asp之家 时间:2010-05-02 18:09:00
三、解决方法二
将xmlDB的端口转换为其它端口,此例转换为8082
SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(), '/xdbconfig/sysconfig/protocolconfig/httpconfig/http-port/text
()', 8082));
Call completed.
SQL> exec dbms_xdb.cfg_refresh;
PL/SQL procedure successfully completed.
将ftp端口由2100转换为2111
SQL> call dbms_xdb.cfg_update(updateXML(dbms_xdb.cfg_get(), '/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text
()',2111));
Call completed.
SQL> commit;
Commit complete.
SQL> exec dbms_xdb.cfg_refresh;
PL/SQL procedure successfully completed.
SQL>
SQL> select dbms_xdb.cfg_get from dual;
CFG_GET
--------------------------------------------------------------------------------
SQL>
检查转换结果,发现8080,2100端口停止使用,而8082、2111端口开始使用。
[root@olivenan root]# lsof -i :8080 -n
[root@olivenan root]# lsof -i :8082 -n
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
tnslsnr 1031 oracle 12u IPv4 18456 TCP *:8082 (LISTEN)
[root@olivenan bin]# lsof -i :2100 -n
[root@olivenan root]# lsof -i :2111 -n
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
tnslsnr 1031 oracle 13u IPv4 18462 TCP *:2111 (LISTEN)
[root@olivenan root]#