linux系統端口號範圍爲0-65535,不一樣的範圍有不一樣意義mysql
查看端口號在/etc/serviceslinux
1.修改ssh端口號(默認22)web
#vim /etc/ssh/sshd_configsql
port 9999apache
#/etc/init.d/sshd restartvim
2.禁止root遠程ssh登錄tomcat
#vim /etc/ssh/sshd_config服務器
PermitRootLogin nodom
#/etc/init.d/sshd restartssh
遠程登錄普通用戶登錄,而後su – root
3.修改apache端口號(默認80)
#vim /etc/httpd/conf/httpd.conf
Listen 80 改成 listen 8000
#service httpd restart
4.修改vsftp端口號(默認21)
#vim /etc/vsftp.conf
listen=2121
5.修改tomcat端口號(默認8080)
#vim /usr/local/tomcat/conf/server.xml
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
注:修改port後面端口號
#cd /usr/local/tomcat/bin
#./startup.sh (重啓服務)
6.修改mysql端口號(默認3306)
#vim /etc/my.cnf
port=3306 修改
#service mysql restart
7.修改weblogic端口號(默認7001)
$cd /u01/weblogic/user_projects/domians/weblogic/config
$vim config.xml
添加<listen-port>80</listen-port>
位置以下:
<server>
<name>AdminServer</name>
<listen-port>80</listen-port>
<listen-address></listen-address>
</server>
$cd /u01/weblogic/user_project/domians/weblogic
$./startWeblogic.sh