Install Jenkins on CentOS

Source: Internet
Author: User

Install Jenkins on CentOS

Install Jenkins on CentOS

1. Add the Jenkins source (repository ):

$ Sudo wget-O/etc/yum. repos. d/jenkins. repo http://jenkins-ci.org/redhat/jenkins.repo

$ Sudo rpm -- import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key

2. Install/check JDK:

$ Java-version

[Root @ user-api1 ~] # Java-version

Java version "1.8.0 _ 40"

Java (TM) SE Runtime Environment (build1.8.0 _ 40-b26)

Java HotSpot (TM) 64-Bit Server VM (build25.40-b25, mixed mode)

3. Install Jenkins:

$ Sudo yum install jenkins

After the installation is complete, the following directories are available:

(3.1)/usr/lib/jenkins/: jenkins installation directory, where the WAR package is located.

[Root @ user-api1 ~] # Ls-rlt/usr/lib/jenkins/

Total 64964

-Rw-r -- 1 root 66519999 Apr 2107:50 jenkins. war

(3.2)/etc/sysconfig/jenkins: The jenkins configuration file, "Port", and "JENKINS_HOME" can all be configured here.

(3.3)/var/lib/jenkins/: Default JENKINS_HOME.

(3.4)/var/log/jenkins. log: Jenkins log file.

4. Start Jenkins

$ Sudo service jenkins start

The following error may occur: "StartingJenkins-bash:/usr/bin/java: No such file or directory ". Jenkins cannot be found and java cannot be found.

In this case, you need "vi/etc/init. d/jenkins" to add the java path (as shown below ):

5. log on to Jenkins

If no special port is configured, Use http: // <ipaddress>: 8080/to log on to Jenkins and perform related configuration (plug-in installation, permission configuration, View/Job creation, and so on ).

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.