SUSE15系统
链接路径
OpenJDK Downloads | Download Java JDK 8 & 11 | OpenLogic
找到java8下载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
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.
注意安装过程中会需要输入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
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
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%]
sudo /usr/lib/systemd/systemd-sysv-install enable jenkins
sudo systemctl start 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
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安装完成