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

相关推荐
凤凰战士芭比Q13 分钟前
Jenkins(部署、基础项目)
运维·servlet·jenkins
沈健_算法小生23 分钟前
Jenkins权限控制实现
运维·jenkins
health_2010@163.com20 小时前
jenkis下载,部署,打包
jenkins
weixin_307779131 天前
赋能插件,驱动图表:Jenkins ECharts API插件详解
运维·开发语言·自动化·jenkins·echarts
一周困⁸天.1 天前
Jenkins 自动化部署 PHP 项目
自动化·jenkins·php
杀手不太冷!1 天前
Jenkins的安装与使用;git clone url的时候,url为http和ssh时候的区别
git·http·jenkins
flying robot1 天前
ELK单节点集群配置
运维·elk·jenkins
沈健_算法小生1 天前
Ubutun22.04离线部署Jenkins最新版
运维·jenkins
野生技术架构师1 天前
SpringBoot+Elasticsearch实现高效全文搜索
spring boot·elasticsearch·jenkins
weixin_307779131 天前
Jenkins Pipeline: Input Step插件详解与实践指南
运维·开发语言·自动化·jenkins·etl