centos 安装jenkins

centos 安装jenkins,第1张

centos 安装jenkins Jenkins Redhat Packages

To use this repository, run the following command:

  sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
  sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
  

If you've previously imported the key from Jenkins, the rpm --import will fail because you already have a key. Please ignore that and move on.

  yum install epel-release # repository that provides 'daemonize'
  yum install java-11-openjdk-devel
  yum install jenkins
  

The rpm packages were signed using this key:

pub   rsa4096 2020-03-30 [SC] [expires: 2023-03-30]
      62A9756BFD780C377CF24BA8FCEF32E745F2C3D5
uid                      Jenkins Project 
sub   rsa4096 2020-03-30 [E] [expires: 2023-03-30]

You will need to explicitly install a Java runtime environment, because Oracle's Java RPMs are incorrect and fail to register as providing a java dependency. Thus, adding an explicit dependency requirement on Java would force installation of the OpenJDK JVM.

  • 2.164 (2019-02) and newer: Java 8 or Java 11
  • 2.54 (2017-04) and newer: Java 8
  • 1.612 (2015-05) and newer: Java 7

With that set up, the Jenkins package can be installed with:

See the installation guide for more information, including how Jenkins is run and where the configuration is stored, etc.

上文所示:

1.先运行

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo

 2.sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key  如果报错加上 --no-check-certificate

3. yum install epel-release # repository that provides 'daemonize'

4.yum install jenkins

 安装完毕!

启动jenkins服务sudo service jenkins start

 浏览器输入ip:8080

 

 

根据页面提示位置/var/lib/jenkins/secrets/initialAdminPassword,获取初始密码

登录进去,我这里是安装推荐插件,也可以选择自定义

 

 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5671993.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存