Chinaunix

标题: 2086,2087端口如何开启,谢谢? [打印本页]

作者: offar    时间: 2007-09-09 12:16
标题: 2086,2087端口如何开启,谢谢?
我新安装的CentOS4.4,并安装了一个虚拟主机管理软件cpanel,
所以访问cpanel需要开启2086,2087端口,但系统没有没有开启该端口。
-----------------------------------------
[root@localhost ~]# netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:1                   0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:783               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:465                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN
tcp        0      0 :::993                      :::*                        LISTEN
tcp        0      0 :::995                      :::*                        LISTEN
tcp        0      0 :::110                      :::*                        LISTEN
tcp        0      0 :::143                      :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
-----------------------------------------
网上查找了几种方法来开启端口,如:
1、修改/etc/services文件,自己没有实现
2、使用命令:[root@localhost ~]# nc -lp 2086 &
[root@localhost ~]# nc -lp 2087 &
执行命令后,[root@localhost ~]# netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:1                   0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2086                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2087                0.0.0.0:*                   LISTEN
http://www.offar.org:2087访问后,[root@localhost ~]# netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State
tcp        0      0 0.0.0.0:1                   0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:2087                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:783               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:465                 0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN
tcp        0      0 :::993                      :::*                        LISTEN
tcp        0      0 :::995                      :::*                        LISTEN
tcp        0      0 :::110                      :::*                        LISTEN
tcp        0      0 :::143                      :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN

[3]+  Stopped                 nc -lp 2086

对这方面了解很少,所以请大家帮助?
如何实现开启2086,2087端口,再次谢谢
作者: platinum    时间: 2007-09-09 22:11
当然了,一个 tcp 断开后 service 那边会退出
http 请求本身就是短连接,所以当然会断开了
作者: q1208c    时间: 2007-09-09 23:30
楼主的想法有点意思, 一般的软件自己会打开端口等待连接的.

不知道你自己想单独开一个干嘛?
作者: offar    时间: 2007-09-10 09:24
现在问题是我安装的cpanel无法进行控制面板,郁闷!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2