A brief installation method of Jenkins under Linux system

Source: Internet
Author: User
Tags administrator password cloudbees

1 Download Package
    • Jenkins
      Visit https://jenkins.io/download/to download the latest (LTS version) War pack.
    • Tomcat
      Visit https://tomcat.apache.org/download-90.cgi to download the latest Tomcat 9.0.
    • Cloudbees-folder
      Visit http://ftp.icm.edu.pl/packages/jenkins/plugins/cloudbees-folder/to download the latest Cloudbees-folder plugin.
2 Environment Configuration
    1. Install Java 8in advance and /etc/profile configure environment variables in files (or other configuration files) JAVA_HOME .
    2. Extract the Tomcat compression package into ~/Jenkins/ the directory, ~/Jenkins/apache-tomcat-9.0.5/bin catalina.sh shutdown.sh and startup.sh Add execute permissions to the directory. (chmod +x *.sh)
    3. Put the first step in the download jenkins.war to the ~/Jenkins/apache-tomcat-9.0.5/webapps/ directory.
3 Starting Tomcat
  1. Execute the ~/Jenkins/apache-tomcat-9.0.5/bin/startup.sh script to start Tomcat ( ./startup.sh ).
    After Tomcat starts, Jenkins.war will be automatically decompressed to generate a Jenkins directory.
  2. Browser Access http://localhost:8080/jenkins/ enters Jenkins's unlock interface (Unlock Jenkins) and requires an administrator password to continue accessing Jenkins.
    The administrator password exists with a initialAdminPassword file named, the location of the file is displayed in the Unlock interface ( ~/.jenkins/secrets/initialAdminPassword ).
  3. After entering the administrator password will go to the plug-in installation interface, some machines installed Jenkins can not access the URL at the beginning of HTTPS, and download plug-ins need to access Https://updates.jenkins.io/current/update-center.json, So there may be Offline .
    At this point, you need to change a file named Files hudson.model.UpdateCenter.xml that are located in the ~/.jenkins/ directory. Replace the URLs in the URL tags in the file with a URL for a mirrored web site that begins with HTTP, such as Http://mirror.xmission.com/jenkins/updates/update-center.json.
    Reboot Tomcat ( shutdown.sh close First, then startup.sh Open).
  4. Re-enter the plug-in installation interface should be able to see the content, but click Install plugin will appear an error: No such plugin: cloudbees-folder , this plugin Jenkins.war is not included in the default, so need to install manually.
    Installation method: The first step to download the files in the cloudbees-folder.hpi ~/Jenkins/apache-tomcat-9.0.5/webapps/jenkins/WEB-INF/detached-plugins/ directory and ~/.jenkins/plugins/ directory can be.
4 Resetting the Administrator password (optional)

After you enter Jenkins, you can reset the password for the admin account in the administration user , so that you don't need to see initialAdminPassword the password in the file the next time you sign in.

5 Installing the plug-in (optional)

You can install some plugins in the System Management--Admin plugin interface for easy use (such as pipeline, Blueocean, Gerrit Trigger, Timestamper, Jira, etc.), if the online installation plugin fails, You can also download the plugin (. hpi) locally via your browser and install it via the upload plugin feature in the Advanced tab.

Note: The above is just one way to install Jenkins.
In addition, it can be java -Djsse.enableSNIExtension=false -jar jenkins.war --httpPort=8081 installed by command because Jenkins.war has a built-in Jetty Server, which is no longer detailed.
Jenkins also provides a binary installation package for each platform, and it is easy to install it directly using the installation package.

A brief installation method of Jenkins under Linux system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.