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

相关推荐
事圆则缓1 天前
Android 使用 Jenkins 实现 CI/CD,并用 SonarQube 建立质量门禁
android·ci/cd·jenkins
Zhou1411365 天前
CICD_01_持续集成与Jenkins入门
运维·ci/cd·jenkins
大貔貅喝啤酒5 天前
Gitea+Jenkins+Docker 搭建 Node 项目 CI/CD 自动部署完整教程
ci/cd·docker·jenkins·js·gitea
guo_wen_qiang6 天前
jenkins流水线参数化配置
运维·docker·容器·jenkins·持续部署
何中应7 天前
Jenkins 如何给设置公司 Logo
运维·ci/cd·jenkins
何中应7 天前
Jenkins 如何配置工作节点
运维·ci/cd·jenkins
wjjzhbb8 天前
Jenkins到ArgoCD——GitOps持续交付实践
运维·缓存·jenkins·argocd
小鱼,8 天前
Jenkins构建完成后发送飞书通知消息
jenkins·cicd
不吃香菜kkk、14 天前
CI/CD(GitOps)学习与部署手册
运维·云原生·容器·kubernetes·云计算·jenkins·argocd
qq_3494479519 天前
Ubuntu26安装jenkins
jenkins