Follow the following commands to avoid an error.
- sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --no-check-certificate
- sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
- sudo yum -y install epel-release
- sudo yum -y install java-11-openjdk
- sudo yum -y install jenkins
- sudo systemctl start jenkins
- sudo systemctl status jenkins
- sudo vi /etc/sysconfig/jenkins [in this file find out JENKINS_PORT=“8080”. now change the port number to 8090 and then exit from the file.]
- sudo systemctl stop jenkins
- sudo systemctl start jenkins
That’s it. The question got correct.
Regards
G Rajasekhar