Jenkins常用命令
Jenkins
安装jenkins
rpm -ivh jenkins-2.164.3-1.1.noarch.rpm
注意,前提是下载了rpm文件和安装了java
wget https://pkg.jenkins.io/redhat-stable/jenkins-2.164.3-1.1.noarch.rpm
重启
/etc/init.d/jenkins restart
查看jenkins状态
systemctl start jenkins.service 启动jenkins
systemctl enable jenkins.service 设置jenkins开机启动
systemctl stop jenkins.service 关闭jenkins
systemctl status jenkins.service 查看jenkins的状态
查看jenkins相关文件路径
[root@localhost jenkins]# rpm -ql jenkins
/etc/init.d/jenkins
/etc/logrotate.d/jenkins
/etc/sysconfig/jenkins
/usr/lib/jenkins
/usr/lib/jenkins/jenkins.war
/usr/sbin/rcjenkins
/var/cache/jenkins
/var/lib/jenkins
/var/log/jenkins
修改jenkins文件夹权限
chown -R jenkins.jenkins tomcat
查看jenkins端口号
cat /etc/sysconfig/jenkins
修改jenkins端口号
vi /etc/sysconfig/jenkins
查看第一次登录的密码
cat /var/lib/jenkins/secrets/initialAdminPassword
优化插件安装速度
vi hudson.model.UpdateCenter.xml
改为
<?xml version='1.1' encoding='UTF-8'?>
<sites>
<site>
<id>default</id>
<url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url>
</site>
</sites>
第一次登录的网址
http://localhost:8080/
参考资料
中文学习资料
程序下载地址
https://jenkins.io/zh/download/
引用
参考资料
https://www.cnblogs.com/godfather007/p/10364578.html
https://blog.csdn.net/lxw983520/article/details/78903419