Jenkins的安装

官网地址 安装 https://pkg.jenkins.io/redhat-stable/

安装前建议安装下JDK11不用配环境变量了

按照官网第一步,就GG了

[root@dlb home]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo  #下载
--2022-07-13 15:00:44--  https://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 146.75.114.133, 2a04:4e42:8c::645
Connecting to pkg.jenkins.io (pkg.jenkins.io)|146.75.114.133|:443... connected.
ERROR: cannot verify pkg.jenkins.io's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
  Issued certificate has expired.
To connect to pkg.jenkins.io insecurely, use `--no-check-certificate'.
#在后面加
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate
[root@dlb home]# rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key   
[root@dlb home]# yum install jenkins #安装

 Jenkins命令

[root@dlb home]# systemctl enable jenkins  #开机启动
[root@dlb home]# systemctl start jenkins   #启动
[root@dlb home]# systemctl status jenkins  #查看状态

启动报错QAQ

发现是8080端口被站用

[root@dlb ~]# netstat -nltp |grep 8080
tcp        0      0 127.0.0.1:8080          0.0.0.0:*               LISTEN      3578/unicorn worker 
[root@dlb ~]# kill -9 2578

关闭被占用端口就可以启动了

 

# 停止jenkins服务
# systemctl stop jenkins
 
# 停止jenkins开机启动服务
# systemctl disable jenkins
 
# yum卸载jenkins
# yum -y remove jenkins
 
# 删除jenkins相关文件
# rm -rf /var/{lib,log,cache}/jenkins /usr/lib/jenkins /root/.jenkins
# rm -rf `sudo find /{etc,var,run} -name "jenkins*"`

 

posted @ 2022-07-13 17:41  大萝卜萌萌哒  阅读(377)  评论(0编辑  收藏  举报