centos8安装jenkins

1、安装OpenJDK

dnf install java-1.8.0-openjdk-devel -y

2.启用Jenkins存储库。运行以下命令下载并导入GPG密钥

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo

sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

 

 3、安装最新的Jenkins文档版本

  安装jenkins -y 会校验key,需要修改配置文件,原本是“”1“” 更改为“”0“”    0意思是不开启key的校验

vim /etc/yum.repos.d/jenkins.repo

  开始安装jenkins

sudo dnf install jenkins -y

4、安装过程完成后,启动Jenkins服务并设置开机自启动

  启动服务

cd /usr/lib/jenkins
nohup java -jar jenkins.war >nohup.out &

 

 查看服务是否起来了

ps -ef|grep jenkins

 

扫描二维码关注公众号,回复: 12162977 查看本文章

 如果服务起不来可以查看nohup.out查看原因,一般是端口8080被占用导致,需要杀掉占用8080端口的服务

 加入开机自启动

sudo systemctl enable jenkins

5、访问应用,默认端口8080

http://ip:8080

完成!!!

 

猜你喜欢

转载自blog.csdn.net/dp340823/article/details/112548837