- sudo apt install openjdk-8-jdk
- wget -q -O – https://pkg.jenkins.io/debian-stable/jenkins.io.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
- sudo apt install jenkins
- sudo ufw allow 8080
(jenkins_url)/restart
– Forces a restart without waiting for builds to complete.
Setting Up Jenkins
To set up your new Jenkins installation, open your browser, type your domain or IP address followed by port 8080, http://your_ip_or_domain:8080 and screen similar to the following will be displayed:
Use the following command to print the password on your terminal:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Copy the password from your terminal, paste it into the Administrator password field and click Continue.
follow the page to setup admin user and url, then you can logon your Jenkins:
http://192.168.0.43:8080/