使用默认配置,Jenkins 正在监听 8080 端口:
$ ss -tulpn | grep 8080
tcp LISTEN 0 50 *:8080 *:* users:(("java",pid=3052,fd=115)
但是,我想改变它并让 Jenkins 监听端口 80。
当我进入/etc/sysconfig/jenkins
并更改JENKINS_PORT
为JENKINS_PORT="80"
并重新启动sudo service jenkins restart
时,我得到:
$ ss -tulpn | grep 8080
$ ss -tulpn | grep 80
$ curl localhost:8080
curl: (7) Failed to connect to localhost port 8080 after 0 ms: Connection refused
$ curl localhost:80
curl: (7) Failed to connect to localhost port 80 after 0 ms: Connection refused
如何让 Jenkins 监听 80 端口?