停止httpd服務
[root@67 sbin]# service httpd stop Redirecting to /bin/systemctl stop httpd.service
查看httpd的狀態,確認httpd服務已經停止
[root@67 sbin]# service httpd status Redirecting to /bin/systemctl status httpd.service ● httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled) Active: inactive (dead) Docs: man:httpd(8) man:apachectl(8) 8月 23 03:36:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server. 8月 23 03:36:07 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server. 8月 30 03:29:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server. 8月 30 03:29:07 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server. 9月 05 03:37:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server. 9月 05 03:37:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server. 9月 06 03:27:01 67.59.247.60.static.bjtelecom.net systemd[1]: Reloading The Apache HTTP Server. 9月 06 03:27:11 67.59.247.60.static.bjtelecom.net systemd[1]: Reloaded The Apache HTTP Server. 9月 11 14:29:34 67.59.247.60.static.bjtelecom.net systemd[1]: Stopping The Apache HTTP Server... 9月 11 14:29:35 67.59.247.60.static.bjtelecom.net systemd[1]: Stopped The Apache HTTP Server.
查找httpd.conf配置文件的存放路徑
find / -name httpd.conf
編輯httpd.conf配置文件
查找Listen配置段

修改Listen后面的端口,默認是80,這里修改為8080
保存並退出
修改后需要再次啟動httpd服務

