参考

http://pkg.jenkins-ci.org/redhat/

wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
获取安装源

rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
导入公钥

yum install jenkins
安装Jenkins
按Y确认

gpasswd -a root jenkins
将jenkins账号加入到root组中

vim /etc/sysconfig/jenkins
修改端口号

默认端口号是8080
JENKINS_PORT="9090"

修改为root权限运行
JENKINS_USER="root"

 

vim /etc/init.d/jenkins
修改jenkins启动脚本
把/usr/bin/java
改为/usr/local/java/jdk1.8.0_201/bin/java

 

firewall-cmd --zone=public --permanent --add-port=9090/tcp
firewall-cmd --reload
开放防火墙9090端口

service jenkins start
chkconfig jenkins on
启动Jenkins

访问http://192.168.1.13:9090/

CentOS7怎样安装Jenkins

 

cat /var/lib/jenkins/secrets/initialAdminPassword

查看安装密码

CentOS7怎样安装Jenkins

CentOS7怎样安装Jenkins

CentOS7怎样安装Jenkins

CentOS7怎样安装Jenkins

 CentOS7怎样安装Jenkins

CentOS7怎样安装Jenkins

CentOS7怎样安装Jenkins

 

service jenkins start/stop/restart
(启动/停止/重启)

 

rm -rf /etc/yum.repos.d/jenkins.repo

安装完成之后删除jenkins yum源

相关文章:

  • 2022-01-09
  • 2022-01-06
  • 2021-06-22
  • 2021-07-12
  • 2021-06-03
猜你喜欢
  • 2021-11-20
  • 2021-11-27
  • 2021-07-29
  • 2021-09-04
  • 2021-08-21
  • 2021-08-23
  • 2021-12-30
相关资源
相似解决方案