Jenkins on CentOS

Posted: December 5, 2014 in Open source

In a nutshell Jenkins CI is the leading open-source continuous integration server. Built with Java, it provides 1009 plugins to support building and testing virtually any project.

First we need to set up the repository as follows:
$ sudo wget -O /etc/yum.repos.d/jenkins.repo \
$ sudo rpm –import
Next we need to check java is installed or not.
Next, we can install the package as shown here:
$ sudo yum install jenkins
This will install the latest version of Jenkins into the /usr/lib/jenkins directory. The default Jenkins home directory will be in /var/lib/jenkins.

Now we can start Jenkins using the service command:
$ sudo service jenkins start
By deafult jenkins listen 8080 port. But here we want to change to some other port.
Initially the jenkins will not start, when Installing Jenkins on CentOS:

[root@fenige_www_dev ~]# service jenkins status
jenkins dead but pid file exists
Change it from JENKINS_AJP_PORT=”8009″ OR whatever value to JENKINS_AJP_PORT=”-1″
It will work for sure.
Login as:
Created logins:
Username: test
Password: secret
Standard Security Setup:
The most common set up — let Jenkins maintain its own user database
Initial steps
1. Go to the Configure Global Security screen and choose “enable security”.
2. Select “Jenkins’s own user database” as the security realm.
3. Place a check mark next to “Allow users to sign up”
4. Select “Matrix-based security” as the authorization
5. Give anonymous user the read access
6. In the text box below the table, type in your user name (you’d be creating this later) and click “add”
7. Give yourself a full access by checking the entire row for your user name
8. Scroll all the way to the bottom, click “save”
At this point, you’ll be taken back to the top page, and Jenkins is successfully secured.
Restart Jenkins (service jenkins restart)
Now you need to create an user account for yourself.

a. Click “login” link at the top right portion of the page
b. Choose “create an account”
c. Use the user name you’ve used in the above step, and fill in the rest.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s