Setup Jenkins on Ubuntu 20.04 / 22.04 and run Jobs are root user

Setup Jenkins on Ubuntu 20.04 / 22.04 and run Jobs are root user

Requirements Add the repository key to the system and append the Debian package repository. wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add - wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io-2023.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 Install Java 17 sudo apt install openjdk-17-jre-headless Update JAVA_HOME in .bashrc : nano ~/.bashrc export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 Install Jenkins sudo apt install jenkins Allow firewall for 8080 port...