@ethelyn
Updating Jenkins in Ubuntu involves a few steps. Here is a more detailed guide:
- Stop the Jenkins service by running the following command:
sudo systemctl stop jenkins
- Backup your Jenkins installation directory by running:
sudo cp -r /var/lib/jenkins /var/lib/jenkins_backup
- Update the Jenkins package repository by running:
sudo wget -q -O - https://pkg.jenkins.io/debian/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'
- Update the package lists:
sudo apt-get update
- Upgrade Jenkins to the latest version:
sudo apt-get upgrade jenkins
- If a new version is available, you will be asked whether to install it. Enter 'Y' to proceed with the update.
- If you have made changes to the Jenkins configuration file (usually located at /etc/default/jenkins), make sure to back up your changes and apply them again after the update.
- Start the Jenkins service:
sudo systemctl start jenkins
- Verify that Jenkins has been updated by accessing the Jenkins web interface in your browser.
That's it! You have successfully updated Jenkins in Ubuntu. Remember to always back up your Jenkins installation and configuration before performing any updates.