Jenkins(8)- CentOS 7.x 通过yum安装jenkins
如果想从头学起Jenkins的话,可以看看这一系列的文章哦
https://www.cnblogs.com/poloyy/category/1645399.html
下载rpm包
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm包地址
https://pkg.jenkins.io/redhat-stable/
导出密钥
注意:若之前已从Jenkins导入过密钥,“rpm--import”将失败,请忽略,继续执行下面
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
安装Jenkins
yum install -y jenkins
查看Jenkins信息
rpm -ql jenkins
配置Jenkins
vim /etc/sysconfig/jenkins
修改端口,默认是8080
JENKINS_PORT="端口号"
启动Jenkins
systemctl start jenkins.service
查看Jenkins状态
systemctl status jenkins.service
卸载Jenkins
#rpm卸载 rpm -e jenkins #检查是否卸载成功 rpm -ql jenkins
彻底删除残留文件
find / -iname jenkins | xargs -n 1000 rm -rf find / -iname .jenkins | xargs -n 1000 rm -rf