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

相关推荐
zmm04201 天前
Could not get unknown property ‘mUser‘ for Credentials [username: null]
jenkins·gradle
keson要进步1 天前
CICD实战(一) -----Jenkins的下载与安装
运维·ci/cd·centos·自动化·jenkins
新兴AI民工2 天前
windows上的visual studio2022的项目使用jenkins自动打包
windows·jenkins·visual studio
风早君2 天前
jenkins集成gitlab发布到远程服务器
服务器·gitlab·jenkins
Thanks_ks2 天前
SpringBoot 自动化部署实战:CI/CD 整合方案与避坑指南
pipeline·jenkins·springboot·自动化部署·gitlab ci/cd·ci/cd 实战·docker 容器化
爱宇阳2 天前
使用 Docker Compose 部署 Jenkins(LTS 版)持续集成环境
ci/cd·docker·jenkins
π大星星️2 天前
Jenkins 工作流程
运维·jenkins
一介草民丶3 天前
Jenkins | Jenkins构建成功服务进程关闭问题
运维·servlet·jenkins
小黄人软件3 天前
jenkins脚本查看及备份
运维·servlet·jenkins
一介草民丶3 天前
Jenkins | Linux环境部署Jenkins与部署java项目
java·linux·jenkins