instruction: Show me how to configure jenkins for CI/CD automation
output: sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]" \ https://pkg.jenkins.io/debian-stable binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/ sudo apt-get update sudo apt-get install jenkins
  sudo wget -O /etc/apt/keyrings/jenkins-keyring.asc \ https://pkg.jenkins.io/debian/jenkins.io-2023.key echo "deb [signed-by=/etc/apt/keyrings/jenkins-keyring.asc]" \ https://pkg.jenkins.io/debian binary/ | sudo tee \ /etc/apt/sources.list.d/jenkins.list > /dev/ sudo apt-get update sudo apt-get install jenkins
  If Jenkins fails to start because a port is in use,
  run systemctl edit jenkins and add the following: [Service]
  Environment="JENKINS_PORT=8081" Here, "8081" was chosen but you can put another port available.
  [Service]
  Environment="JENKINS_PORT=8081"
  sudo apt update sudo apt install fontconfig openjdk-21-jre
  java -version openjdk version "21.0.3" 2024-04-16
  OpenJDK Runtime Environment ( build 21.0.3+11-Debian-2 ) OpenJDK 64-Bit Server VM ( build 21.0.3+11-Debian-2, mixed mode, sharing )
  Why use apt and not apt-get or another command?
  The apt command has been available since 2014.
  It has a command structure that is similar to apt-get but was created to be a more pleasant experience for typical users.
  Simple software management tasks like install, search and remove are easier with apt .
  sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-21-openjdk sudo dnf install jenkins sudo systemctl daemon-reload
  sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key sudo dnf upgrade # Add required dependencies for the jenkins package sudo dnf install fontconfig java-21-openjdk sudo dnf install jenkins
  sudo systemctl enable jenkins
  sudo systemctl start jenkins
  sudo systemctl status jenkins
  Loaded: loaded ( /lib/systemd/system/jenkins.service ; enabled ; vendor preset: enabled ) Active: active ( running ) since Tue 2018-11-13 16:19:01 +03 ; 4min 57s ago
  If you have a firewall installed, you must add Jenkins as an exception.
  You must change YOURPORT in the script below to the port you want to use.
  Port 8080 is the most common. YOURPORT = 8080 PERM = "--permanent" SERV = " $PERM --service=jenkins" firewall-cmd $PERM --new-service = jenkins
  firewall-cmd $SERV --set-short = "Jenkins ports" firewall-cmd $SERV --set-description = "Jenkins port exceptions" firewall-cmd $SERV --add-port = $YOURPORT /tcp
  firewall-cmd $PERM --add-service = jenkins
  firewall-cmd --zone = public --add-service = http --permanent firewall-cmd --reload
  YOURPORT = 8080 PERM = "--permanent" SERV = " $PERM --service=jenkins" firewall-cmd $PERM --new-service = jenkins
  firewall-cmd $SERV --set-short = "Jenkins ports" firewall-cmd $SERV --set-description = "Jenkins port exceptions" firewall-cmd $SERV --add-port = $YOURPORT /tcp
  firewall-cmd $PERM --add-service = jenkins
  firewall-cmd --zone = public --add-service = http --permanent firewall-cmd --reload
  
  sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat-stable/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key sudo yum upgrade # Add required dependencies for the jenkins package sudo yum install fontconfig java-21-openjdk sudo yum install jenkins sudo systemctl daemon-reload
  sudo wget -O /etc/yum.repos.d/jenkins.repo \ https://pkg.jenkins.io/redhat/jenkins.repo sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io-2023.key sudo yum upgrade # Add required dependencies for the jenkins package sudo yum install fontconfig java-21-openjdk sudo yum install jenkins
  sudo systemctl enable jenkins
  sudo systemctl start jenkins
  sudo systemctl status jenkins
  Loaded: loaded ( /lib/systemd/system/jenkins.service ; enabled ; vendor preset: enabled ) Active: active ( running ) since Tue 2023-06-22 16:19:01 +03 ; 4min 57s ago
  ...
  If you have a firewall installed, you must add Jenkins as an exception.
  You must change YOURPORT in the script below to the port you want to use.
  Port 8080 is the most common. YOURPORT = 8080 PERM = "--permanent" SERV = " $PERM --service=jenkins" firewall-cmd $PERM --new-service = jenkins
  firewall-cmd $SERV --set-short = "Jenkins ports" firewall-cmd $SERV --set-description = "Jenkins port exceptions" firewall-cmd $SERV --add-port = $YOURPORT /tcp
  firewall-cmd $PERM --add-service = jenkins
  firewall-cmd --zone = public --add-service = http --permanent firewall-cmd --reload
  YOURPORT = 8080 PERM = "--permanent" SERV = " $PERM --service=jenkins" firewall-cmd $PERM --new-service = jenkins
  firewall-cmd $SERV --set-short = "Jenkins ports" firewall-cmd $SERV --set-description = "Jenkins port exceptions" firewall-cmd $SERV --add-port = $YOURPORT /tcp
  firewall-cmd $PERM --add-service = jenkins
  firewall-cmd --zone = public --add-service = http --permanent firewall-cmd --reload
  If you are not sure what plugins you need, choose Install suggested
  plugins .
  You can install (or remove) additional Jenkins plugins at a later point in time
  via the Manage Jenkins > Plugins page in Jenkins.