SUSE15安装Jenkins操作说明

环境说明

        SUSE15系统

安装Openjdk

下载java8软件包

链接路径

OpenJDK Downloads | Download Java JDK 8 & 11 | OpenLogic

找到java8下载rpm软件包

 openlogic-openjdk-8u262-b10-linux-x64-el.rpm

指令安装openlogic-openjdk-8u262-b10-linux-x64-el.rpm

sudo rpm -ivh openlogic-openjdk-8u262-b10-linux-x64-el.rpm

sudo rpm -ivh openlogic-openjdk-8u262-b10-linux-x64-el.rpm 
warning: openlogic-openjdk-8u262-b10-linux-x64-el.rpm: Header V4 RSA/SHA256 Signature, key ID 22eb6536: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:openlogic-openjdk-8-hotspot-8u262################################# [100%]
update-alternatives: using /usr/lib/jvm/openlogic-openjdk-8-hotspot/bin/java to provide /usr/bin/java (java) in auto mode
update-alternatives: using /usr/lib/jvm/openlogic-openjdk-8-hotspot/bin/javac to provide /usr/bin/javac (javac) in auto mode

 查看java安装版本

 安装Jenkins

添加Jenkins repository

sudo zypper addrepo -f http://pkg.jenkins.io/opensuse-stable/ jenkins
w210412@linux-jzp3:~> sudo zypper addrepo -f http://pkg.jenkins.io/opensuse-stable/ jenkins
[sudo] password for root: 
Adding repository 'jenkins' ..............................................[done]
Repository 'jenkins' successfully added

URI         : http://pkg.jenkins.io/opensuse-stable/
Enabled     : Yes                                   
GPG Check   : Yes                                   
Autorefresh : Yes                                   
Priority    : 99 (default priority)                 

Repository priorities are without effect. All enabled repositories share the same priority.

指令安装Jenkins

注意安装过程中会需要输入a确认trust always

Do you want to reject the key, trust temporarily, or trust always? [r/t/a/? shows all options] (r): a

安装过程需要输入y确认安装

Overall download size: 68.8 MiB. Already cached: 0 B. After the operation, additional 69.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y

w210412@linux-jzp3:~> sudo zypper install jenkins
Retrieving repository 'jenkins' metadata ------------------------------------------------------------------------------------------------------------------------------------[-]

New repository or package signing key received:

  Repository:       jenkins                                           
  Key Name:         Jenkins Project <jenkinsci-board@googlegroups.com>
  Key Fingerprint:  62A9756B FD780C37 7CF24BA8 FCEF32E7 45F2C3D5      
  Key Created:      Mon 30 Mar 2020 09:10:17 PM CST                   
  Key Expires:      Thu 30 Mar 2023 09:10:17 PM CST                   
  Subkey:           D9DBB52468F30BD7 2020-03-30 [expires: 2023-03-30] 
  Rpm Name:         gpg-pubkey-45f2c3d5-5e81efb9                      


Do you want to reject the key, trust temporarily, or trust always? [r/t/a/? shows all options] (r): a
Retrieving repository 'jenkins' metadata .................................................................................................................................[done]
Building repository 'jenkins' cache ......................................................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  jenkins

The following package has no support information from its vendor:
  jenkins

1 new package to install.
Overall download size: 68.8 MiB. Already cached: 0 B. After the operation, additional 69.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
Retrieving package jenkins-2.303.2-1.2.noarch                                                                                              (1/1),  68.8 MiB ( 69.0 MiB unpacked)
Retrieving: jenkins-2.303.2-1.2.noarch.rpm ..................................................................................................................[done (87.2 KiB/s)]
Checking for file conflicts: .............................................................................................................................................[done]
(1/1) Installing: jenkins-2.303.2-1.2.noarch .............................................................................................................................[done]
Additional rpm output:
warning: /etc/zypp/repos.d/jenkins.repo created as /etc/zypp/repos.d/jenkins.repo.rpmnew
/sbin/insserv: No such file or directory

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

If you want to list systemd services use 'systemctl list-unit-files'.
To see services enabled on particular target use
'systemctl list-dependencies [target]'.

jenkins                   0:off  1:off  2:off  3:off  4:off  5:off  6:off

注意事项

安装log有如下警告信息

Additional rpm output:
warning: /etc/zypp/repos.d/jenkins.repo created as /etc/zypp/repos.d/jenkins.repo.rpmnew
/sbin/insserv: No such file or directory

Note: This output shows SysV services only and does not include native
systemd services. SysV configuration data might be overridden by native
systemd configuration.

解决方案

以下链接地址下载insserv-compat包

RPM resource /lib/lsb/init-functions (rpmfind.net)

之后使用以下指令安装

sudo rpm -ivh insserv-compat-0.1-lp150.2.1.noarch.rpm

w210412@linux-jzp3:~> sudo rpm -ivh insserv-compat-0.1-lp150.2.1.noarch.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:insserv-compat-0.1-lp150.2.1     ################################# [100%]

设置开机启动Jenkins

sudo /usr/lib/systemd/systemd-sysv-install enable jenkins

启动Jenkins

sudo systemctl start Jenkins

确认Jenkins已经启动

w210412@linux-jzp3:~> ps -aux | grep jenkins
jenkins    7551 82.9 10.0 3947088 181744 ?      Sl   00:22   0:12 /usr/lib/jvm/openlogic-openjdk-8-hotspot/bin/java -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --javaHome=/usr/lib/jvm/openlogic-openjdk-8-hotspot --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20

配置Jenkins

SUSE15打开火狐浏览器

在浏览器 http://127.0.0.1:8080打开Jenkins的Getting Started页面

输入初始管理员密码

 到/var/lib/jenkins/secrets/initialAdminPassword目录下查看密码,然后复制输入到密码框

sudo cat /var/lib/jenkins/secrets/initialAdminPassword
XXXXX2f17c744b16870bae822cdXXXXX

 

输入密码之后,点击Continue,弹出如下界面,选择Install suggested plugins

 

等待插件安装完成

创建Jenkins的管理员密码

输入之后,点击Save and Continue弹出如下界面 

 点击Save and Finish

点击Start using Jenkins

至此,Jenkins安装完成 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wellnw

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值