惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
S
Securelist
D
Docker
The Register - Security
The Register - Security
GbyAI
GbyAI
Recorded Future
Recorded Future
Engineering at Meta
Engineering at Meta
Stack Overflow Blog
Stack Overflow Blog
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
罗磊的独立博客
博客园 - 【当耐特】
F
Full Disclosure
WordPress大学
WordPress大学
腾讯CDC
小众软件
小众软件
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
SecWiki News
SecWiki News
L
Lohrmann on Cybersecurity
I
InfoQ
MyScale Blog
MyScale Blog
量子位
Cyberwarzone
Cyberwarzone
博客园 - 三生石上(FineUI控件)
The Hacker News
The Hacker News
F
Fortinet All Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Jina AI
Jina AI
博客园_首页
H
Help Net Security
K
Kaspersky official blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Webroot Blog
Webroot Blog
Blog — PlanetScale
Blog — PlanetScale
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
The Cloudflare Blog
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tailwind CSS Blog
爱范儿
爱范儿
P
Privacy International News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
The GitHub Blog
The GitHub Blog
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog RSS Feed

Linux - 分类 - cywhat's blog

Linux生成自定义名称的ssh证书 Jmeter进行分布式压测 Jenkins添加html报告并发送到邮箱 Jenkins插件无法安装解决 Jenkins报错 Bash:newman:command Not Found Linux安装newman生成postman脚本报告 Linux配置时间同步 如何保持Ssh长时间连接不断开 Raid磁盘阵列
Jenkins端口修改之后没有生效
cywhat · 2023-04-07 · via Linux - 分类 - cywhat's blog

1、问题

jenkins通过systemctl start jenkins.service启动服务,端口不是配置文件里自定义的端口

2、排查

1、系统service配置

1
2
3
4
vim /lib/systemd/system/jenkins.service

# 修改端口号
Environment="JENKINS_PORT=9898"

/img/img73.png

2、etc下的系统配置

1
2
3
4
vim /etc/sysconfig/jenkins

# 修改端口号
JENKINS_PORT="9898"

/img/img74.png

3、通过systemctl status查看启动配置文件的路径

1
systemctl status jenkins.service

/img/img75.png

1
2
3
4
5
注意需要排查上面图片中框选出来的`1`和`2`

1:系统配置文件路径,上面已经更改了没问题

2:该文件是一个重写文件,问题就在这里,需要把里面的端口号也更改为9898
1
vim /etc/systemd/system/jenkins.service.d/override.conf

/img/img76.png

3、解决

1
2
3
4
5
# 重新加载systemctl配置
systemctl daemon-reload

# 重启jenkins
systemctl restart jenkins.service

4、查看jenkins服务

1
netstat -ntlp   #有端口为9898的服务已经在运行了

关注一下再走吧

公众号 小程序

赞赏支持

微信打赏 支付宝打赏