Add the jenkins package:
$ 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 update
Create the user "
jenkins
":
Note that you can choose not to create this user manually, and Jenkins will create it if the installation completes without errors.
$ sudo useradd jenkins
$ sudo passwd jenkins
$ sudo mkdir /var/lib/jenkins
$ sudo chmod -R 755 /var/lib/jenkins
$ sudo chown -R jenkins:jenkins /var/lib/jenkins
$ sudo usermod --home /var/lib/jenkins/ --shell /bin/bash jenkins
Install Jenkins:
$ sudo apt install jenkins
If the installation completes without errors, Jenkins will be started.
The user '
jenkins
' will run Jenkins as daemon (see /etc/init.d/jenkins).
By default Jenkins will listen on port 8080:
http://localhost:8080
You need to provide the administrator password to unlock Jenkins.
You can find the administrator password in this file:
/var/lib/jenkins/secrets/initialAdminPassword
Copy/past the administrator password and click the "
Continue
" button.
The Getting Started page may ask you to customize Jenkins by installing plugins.
You can close this page if you want to skip this step or click the "
Install suggested plugins
" button:
When the plugins installation is completed you will be redirected to "
Create First Admin User
" page:
You can click the "
Continue as admin
" link to go the "
Instance Configuration
" page:
Click the "
Save and Finish
" button and Jenkins will be ready:
Click the "
Start using Jenkins
" button to go the Welcome page: