How to Release Port 8888 on OEL5.5

on

准备在OEL5.5中安装Oracle VM Manager,文档中说明要保证8888端口可用。

# netstat -na |grep 8888
unix  3      [ ]         STREAM     CONNECTED     8888 

说明该端口已经被占用,那么如何释放该端口?

通过lsof命令可以看到该端口被avahi-daemon程序占用。avahi-daemon的主页可以参看avahi.org

# lsof | grep 8888
avahi-dae 2747     avahi   12u     unix 0xeb4d9740                8888 socket

检查自动启动的服务,发现avahi-daemon是自动启动的。

# chkconfig --list | grep avahi
avahi-daemon   	0:off	1:off	2:off	3:on	4:on	5:on	6:off
avahi-dnsconfd 	0:off	1:off	2:off	3:off	4:off	5:off	6:off

停止avahi-daemon,需要使用avahi-daemon脚本停止。

# service avahi-daemon off
Usage: /etc/init.d/avahi-daemon {start|stop|status|restart|condrestart}
# /etc/init.d/avahi-daemon stop
Shutting down Avahi daemon:                                [  OK  ]

设置avahi-daemon不再随着机器重启而自动启动。

# chkconfig avahi-daemon off

再次检查,端口已经释放。

# netstat -na |grep 8888

Leave a Reply

Your email address will not be published. Required fields are marked *