Installing Jenkins
wget -q -O https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
This packae installation will:
- Setup Jenkins as a daemon launched on start. See /etc/init.d/jenkins for more details.
ln -s /**/bin/java /usr/bin/java
if you install java in the user configuration, you need this.
- Create a ‘jenkins’ user to run the this service
already automate create
sudo usermod -aG root jenkins
- Direct console log output to the file /var/log/jenkins/jenkins.log. Check this file if you are troubleshooting jenkins.
log init password
- Populate /etc/default/jenkins with configuration parameters for the launch.
configuration file
- Set Jenkins to listen on port 8080. Access this port with your browser to start configuration.
Starting Jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins
Post-installation setup wizard
Unlocking Jenkins
- Browser to http://localhost:8080.
- copy password.
cat /var/log/jenkins/jenkins.log
sudo cat /var/lib/jenkins/secrets/initialAdminPassword.
- paste.
Customizing Jenkins with plugins
- Install suggested plugins
Manage Jenkins> Manage Plugins
- Select plugins to install
Creating the first administrator user
- creat first admin user.
- restart
- log in.