Jenkins Installation and Management
Jenkins Installation and Management
References
Installation
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install jenkins
Starting Jenkins
sudo systemctl start jenkins
sudo systemctl status jenkins # to see status
Opening the Firewall
(install ssh)
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw allow 8080
sudo ufw status
Setting Up Jenkins
- Open your browser and navigate to
http://your_server_ip_or_domain:8080. -
To get the initial admin password, run the following command:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword - Follow the instructions in the DigitalOcean blog for security (SSL).
Status, Start, Stop, Restart
sudo systemctl status jenkins.service
sudo systemctl start jenkins.service
sudo systemctl stop jenkins.service
sudo systemctl restart jenkins.service
Auto start at boot time
sudo systemctl disable jenkins.service
sudo systemctl enable jenkins.service # by default it is enabled