LAB: Jenkins does not install

Lab: Install Jenkins on a VM - KodeKloud

Jenkins Service gives me a generic error. Maybe because I am using Java 11, which is the latest version available in the Lab OS - CentOS 7.

[bob@centos-host ~]$ sudo systemctl enable jenkins
Created symlink from /etc/systemd/system/multi-user.target.wants/jenkins.service to /usr/lib/systemd/system/jenkins.service.
[bob@centos-host ~]$ sudo systemctl start jenkins
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
[bob@centos-host ~]$ sudo systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
   Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Wed 2023-09-13 06:49:41 UTC; 3s ago
  Process: 1778 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
 Main PID: 1778 (code=exited, status=1/FAILURE)

Sep 13 06:49:41 centos-host systemd[1]: Failed to start Jenkins Continuous Integration Server.
Sep 13 06:49:41 centos-host systemd[1]: Failed to start Jenkins Continuous Integration Server.

Command history:

[bob@centos-host ~]$ history
    1  cat /etc/os-release 
    2  sudo wget -O /etc/yum.repos.d/jenkins.repo     https://pkg.jenkins.io/redhat-stable/jenkins.repo
    3  sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
    4  sudo yum upgrade
    5  sudo yum install java-17-openjdk
    6  sudo yum search openjdk | more
    7  sudo yum install java-11-openjdk
    8  sudo yum install jenkins
    9  sudo systemctl enable jenkins
   10  sudo systemctl start jenkins
   11  sudo systemctl status jenkins

Anyway, I was able to install it on a Hyper V VM.

Centos installation fails everytime on lab. not sure why. I have a Hyperv running and no issue with ubuntu there.