The objective is to install Jenkins on Ubuntu 18.04 Bionic Beaver Linux. To start, first add Jenkins's signing key and repository using the below commands:
This is a companion discussion topic for the original entry at https://linuxconfig.org/install-jenkins-on-ubuntu-18-04-bionic-beaver-linux
Jay Lawrence
Ubuntu server 18.04 defaults openjdk 9 which Jenkins does not want.
Prior to installing Jenkins you should:
$ sudo apt-get install openjdk-8-jdk
If you have already tried to install Jenkins and it pulled in JDK 9. Then install the JDK above and then select JDK 8 using:
$ sudo update-alternatives --config java
choose the line for jdk 8 which was 1 in my case.
see Debian Jenkins Packages for more info
totolafripouillleeee -> Jay Lawrence
Thanks, it helped me !
- It should be noted that currently Ubuntu 18.04 Bionic Beaver comes out of the box with OpenJDK 10 by default.
- It should also be noted that by default Ubuntu 18.04 Bionic Beaver Server does not have the universe repository enabled (which is where OpenJDK 8 resides).
So:
- In order to enable universe repository execute:
add-apt-repository universe
apt-get update
- Then install OpenJDK 8 (I install headless cuz its a server):
apt-get install openjdk-8-jdk-headless
- Either point all Java alternatives to OpenJDK
update-java-alternatives -s java-1.8.0-openjdk-amd64
Or just the java
update-alternatives --config java
Then follow the above article.
1 Like