Install Jenkins on Ubuntu 16.04 LTS with one command line
Script for installing Jenkins on Ubuntu 16.04 LTS
Environment
- Ubuntu 16.04 LTS
Jenkins - quick installation
The following script will install Jenkins v2.150.1 ( @ Jan 15, 2019 ) on your machine (fill your [sudo] password for installing):
wget "https://firebasestorage.googleapis.com/v0/b/minh-nguyen-blog.appspot.com/o/download%2Fjenkins-install.sh?alt=media&token=ec10985d-92f3-45fe-9d97-f4796c416ef1" -O jenkins-install.sh && sh jenkins-install.sh && rm jenkins-install.sh
Script content:
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 -y jenkins
Jenkins - common commands
sudo service jenkins status
sudo service jenkins restart
Jenkins - config
Jenkins default configuration file:
sudo nano /etc/default/jenkins
If port 8080 is used, change HTTP_PORT field value to 8081 or prefered port.
Jenkins initial admin password:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
References:
https://www.tutorialspoint.com/articles/how-to-install-jenkins-on-ubuntu