• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Jenkins | Installation
  1. References
  2. Installation (Ubuntu 18.04)
  3. Change "admin" password
  4. Jenkins log files
  5. Start/Stop Jenkins
  6. How to disable the security
  7. How to enable the security
  8. Uninstallation

  1. References
    See this page for steps on how to install Jenkins on Ubuntu:
    https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
  2. Installation (Ubuntu 18.04)
    Add the jenkins package:

    Create the user "jenkins":
    Note that you can choose not to create this user manually, and Jenkins will create it if the installation completes without errors.

    Install Jenkins:

    If the installation completes without errors, Jenkins will be started.
    The user 'jenkins' will run Jenkins as daemon (see /etc/init.d/jenkins).

    By default Jenkins will listen on port 8080: http://localhost:8080

    Unlock - Jenkins

    You need to provide the administrator password to unlock Jenkins.
    You can find the administrator password in this file: /var/lib/jenkins/secrets/initialAdminPassword
    Copy/past the administrator password and click the "Continue" button.

    Getting Started - Jenkins

    The Getting Started page may ask you to customize Jenkins by installing plugins.
    You can close this page if you want to skip this step or click the "Install suggested plugins" button:

    Plugins - Jenkins

    When the plugins installation is completed you will be redirected to "Create First Admin User" page:

    Admin User - Jenkins

    You can click the "Continue as admin" link to go the "Instance Configuration" page:

    Welcome - Jenkins

    Click the "Save and Finish" button and Jenkins will be ready:

    Jenkins is ready - Jenkins

    Click the "Start using Jenkins" button to go the Welcome page:

    Welcome - Jenkins
  3. Change "admin" user password
    To change the "admin" user password, follow the following steps:
    • Click the "Manage Jenkins" link.
    • Click the "Manage Users" link.
    • Click the "admin" user link.
    • Click the "Configure" link.
    • Modify the "admin" user password and Click the "Save" button.
  4. Jenkins log files
    Jenkins log files can be found in this folder: "/var/log/jenkins/"
  5. Start/Stop Jenkins
    By default Jenkins is configured to run as a service.
    If needed you can use the "start" and "stop" commands to start and stop Jenkins.

    Start Jenkins:

    Stop Jenkins:
  6. How to disable the security
    You can disable the security if needed (for example you have forgotten your "admin" password!):
    • Open the "/var/lib/jenkins/config.xml" file.
    • Set the "useSecurity" element to "false".
    • Remove or comment the "authorizationStrategy" and "securityRealm" elements (see bellow an example of the content of these 2 elements).
    • Restart Jenkins.




  7. How to enable the security
    Make sure you will be able to authenticate to Jenkins after enabling the security.
    If you are using Jnekins' own user database, make sure you have created/configured a user.

    • You can enable the security by adjusting Jnekins' "config.xml" file:
      • Open the "/var/lib/jenkins/config.xml" file.
      • Set the "useSecurity" element to "true".
      • Add the "authorizationStrategy" and "securityRealm" elements.
      • Restart Jenkins.





    • You can also enable the security directly from Jenkins UI:
      • Click the "Manage Jenkins" link.
      • Click the "Configure Global Security" link.
      • Check the "Enable security" checkbox.
      • In "Security Realm" access control, check "Jenkins’ own user database" radio button.
      • In "Authorization" access control, check "Logged-in users can do anything" radio button.
      • In "Authorization" access control, un-check "Allow anonymous read access" checkbox.
      • Click the "Apply" and "Save".
      • Restart Jenkins.

      Configure Global Security: Enable security - Jenkins
  8. Uninstallation
    List Jenkins installed packages:

    Uninstall Jenkins:

    Uninstall Jenkins and its dependencies:

    Delete Jenkins directories:
© 2025  mtitek