Jenkins常用命令(Linux篇)

查看jenkins是否运行: systemctl status jenkins.service
查看运行日志: journalctl -xe
启动命令: systemctl start jenkins
查看状态: systemctl status jenkins
修改文件后重新加载:systemctl daemon-reload

修改端口号:

vim /etc/init.d/jenkins

--httpPort=8091

vim /usr/lib/systemd/system/jenkins.service

Environment="JENKINS_PORT=8091"

查看某个应用所在目录:

find / -name 应用名 (find / -name nginx)

/usr/lib/jvm/java-11-openjdk-arm64

systemctl命令

启动一个服务:systemctl start nginx.service

关闭一个服务:systemctl stop postfix.service

重启一个服务:systemctl restart nginx.service

显示一个服务的状态:systemctl status postfix.service

在开机时启用一个服务:systemctl enable nginx.service

在开机时禁用一个服务:systemctl disable nginx.service

查看服务是否开机启动:systemctl is-enabled nginx.service

查看已启动的服务列表:systemctl list-unit-files|grep enabled

查看启动失败的服务列表:systemctl --failed

列出所有的系统服务:systemctl

​​​列出所有启动unit:systemctl list-units

列出所有启动文件:systemctl list-unit-files

过滤查看启动项:systemctl list-unit-files | grep enable

过滤查看某服务的状态:systemctl list-unit-files | grep sshd

相关推荐
fengyehongWorld13 小时前
Jenkins 安装与简单配置
运维·jenkins
weixin_307779132 天前
Linux下Jenkins数据故障的系统化排查Shell脚本
linux·运维·服务器·jenkins
海兰5 天前
【Elasticsearch】工作流自动化评估
elasticsearch·自动化·jenkins
tianyuanwo5 天前
深入掌握 java -jar 命令:从基础到 Jenkins Agent 实战
java·jenkins·jar
这个需求做不了6 天前
Jenkins自动化构建与CI/CD流水线,并配置GitLab
java·ci/cd·自动化·gitlab·jenkins
007张三丰7 天前
软件测试专栏(15/20):REST Assured接口自动化框架实战
运维·自动化·jenkins·接口自动化·rest·assured
qq_452396239 天前
第二篇:《Jenkins 从零搭建:安装、配置与第一个 Pipeline》
java·运维·jenkins
用户6757049885029 天前
手摸手教你玩 Jenkins,一次搞懂 CI/CD!(第三章:发布之nodeAgent)
后端·jenkins
qq_452396239 天前
第三篇:《Jenkins Pipeline as Code:Declarative Pipeline 深度实战》
java·servlet·jenkins
用户6757049885029 天前
手摸手教你玩 Jenkins,一次搞懂 CI/CD!(第二章:发布之sshPublisher)
后端·jenkins