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

相关推荐
朱杰jjj2 小时前
解决jenkins的Exec command命令nohup java -jar不启动问题
java·jenkins·jar
ldj20202 天前
Jenkins 部署脚本
jenkins
你想考研啊2 天前
三、jenkins使用tomcat部署项目
运维·tomcat·jenkins
你想考研啊2 天前
四、jenkins自动构建和设置邮箱
运维·jenkins
Code blocks2 天前
使用Jenkins完成springboot项目快速更新
java·运维·spring boot·后端·jenkins
会又不会2 天前
Jenkins-Email Extension 插件插件
运维·jenkins
东林牧之2 天前
CICD[导航]、docker+gitlab+harbor+jenkins从安装到部署
docker·gitlab·jenkins
biass3 天前
jenkins角色权限
运维·jenkins
tomorrow.hello3 天前
Jenkins Pipeline(二)
运维·jenkins
会又不会3 天前
Jenkins-Publish HTML reports插件
运维·jenkins