1. Prerequisite preparation
JDK has been installed
echo $PATH
Create a soft connection to configure according to your own jdk installation path
ln -s /java/jdk1.8.0_231/bin/java /usr/bin/java
The machine is networked
Uninstall jenkins (skip if it is already installed)
sudo apt-get remove jenkins
sudo apt-get purge jenkins
sudo apt-get purge --auto-remove jenkins
2. Complete the installation with the following command
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
sudo /etc/init.d/jenkins [start|restart|stop]
cat /var/lib/jenkins/secrets/initialAdminPassword
$ sudo vi /etc/default/jenkins
# Modify the following content
HTTP_PORT=8085
# Restart jenkins service
$ sudo /etc/init.d/jenkins restart
Enter the password you just queried
Wait patiently for installation
to sum up
The above is a detailed explanation of how to install Jenkins on Ubuntu 16.04 introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message. The editor will reply to you in time. Thank you very much for your support to the ZaLou.Cn website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!
Recommended Posts