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

相关推荐
测试开发Kevin10 小时前
详解Jenkins 的 Declarative Pipeline中post 语法
jenkins·devops
一张假钞2 天前
Jenkins 项目迁移
ci/cd·jenkins
软件测试君2 天前
Jenkins Share Library教程 —— 开发入门
jenkins
Broken Arrows3 天前
如何在Linux服务器上部署jenkins?
linux·jenkins
19岁开始学习3 天前
PHP操作elasticsearch7.8
elasticsearch·jenkins·php
wearegogog1233 天前
Centos7下docker的jenkins下载并配置jdk与maven
java·docker·jenkins
gb42152874 天前
elasticsearch索引多长时间刷新一次(智能刷新索引根据数据条数去更新)
大数据·elasticsearch·jenkins
故事很腻i4 天前
安装elk
运维·elk·jenkins
小醉你真好4 天前
15、Docker Compose 安装ELK + Filebeat单机版
elk·docker·jenkins
com未来5 天前
当通过API发送请求的方式自动触发Jenkins job报错HTTP Status 403 – Forbidden的解决办法
运维·jenkins