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

相关推荐
cxyll12343 小时前
postman+newman+jenkins接口自动化
自动化·jenkins·postman
楠奕4 小时前
elasticsearch8.12.0安装分词
运维·jenkins
测试老哥4 小时前
pytest+requests+allure自动化测试接入Jenkins学习
自动化测试·软件测试·学习·测试工具·职场和发展·jenkins·pytest
中国lanwp4 小时前
Jenkins Pipeline中参数化构建
java·jenkins
java资料站4 小时前
Jenkins
运维·jenkins
睡觉z2 天前
Jenkins持续集成系统
运维·ci/cd·jenkins
TPBoreas2 天前
Jenkins启动端口修改失败查找日志
运维·服务器·jenkins
遇见火星2 天前
Jenkins全链路教程——Jenkins调用Maven构建项目
运维·jenkins·maven
clever1013 天前
在ubuntu系统上离线安装jenkins的做法
ubuntu·servlet·jenkins
wumingxiaoyao3 天前
Jenkins - CICD 注入环境变量避免明文密码暴露
jenkins·环境变量·cicd·credential