Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Jenkins Online

  1. Install Jenkins.
    yum install jenkins -y
  2. Reload the systemd manager configuration.
    systemctl daemon-reload
  3. Start jenkins.service and enable it to start upon system startup.
    systemctl --now enable jenkins.service
  4. Optional: Configure the firewall.
    1. Query the OS firewall status of the server.
      systemctl status firewalld

      If the firewall is enabled (active), perform 4.b to 4.e to enable the port. If the firewall is disabled, skip the following operations in this step.

    2. Configure the firewall as required to allow access to port 8080.
      firewall-cmd --permanent --zone=public --add-port=8080/tcp
      firewall-cmd --permanent --zone=public --add-service=http
    3. By default, the following firewall rule is added if the RPM installation mode is used.
      firewall-cmd --permanent --zone=public --add-service=jenkins
    4. Reload the firewall and retain status information.
      firewall-cmd --reload
    5. Check whether the firewall rule is effective.
      firewall-cmd --zone=public --query-port=8080/tcp

      The following output shows that the Jenkins and HTTP services and port 8080 have been added to the firewall rule.

      yes