一、问题

jenkins网站绑定域名后直接通过域名访问使用的是8080端口,为方便用户访问因此须监听80端口,而为了安全起见linux一般不用root身份运行,综上,需要以普通用户来运行监听80端口时就会启动失败,报没有权限,因为linux只有root身份才能监听1024以下的端口。

二、解决

通过firewalld进行端口转发

开启firewalld防火墙

systemctl start firewalld

开机启动

systemctl enable firewalld

放行80端口

firewall-cmd --permanent --zone=public --add-service=http

转发80端口流量到8080

firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=8080

立即生效

firewall-cmd --reload

一、问题

jenkins网站绑定域名后直接通过域名访问使用的是8080端口,为方便用户访问因此须监听80端口,而为了安全起见linux一般不用root身份运行,综上,需要以普通用户来运行监听80端口时就会启动失败,报没有权限,因为linux只有root身份才能监听1024以下的端口。

二、解决

通过firewalld进行端口转发

开启firewalld防火墙

systemctl start firewalld

开机启动

systemctl enable firewalld

放行80端口

firewall-cmd --permanent --zone=public --add-service=http

转发80端口流量到8080

firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=8080

立即生效

firewall-cmd --reload

相关文章:

  • 2021-09-24
  • 2019-05-18
  • 2021-08-14
  • 2021-08-04
  • 2021-09-17
  • 2021-10-12
猜你喜欢
  • 2022-12-23
  • 2021-05-19
  • 2021-12-01
  • 2022-12-23
  • 2022-01-16
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案