Jenkins is a self-contained , free, opensource and most popular continuous Integration (CI) tool written in JAVA . It is used to automate all sorts of tasks related to testing, building and deploying the source code. Jenkins Installation on RHEL 7 Steps.
Jenkins supports all version control system , including Subversion,Git, RTC, CVS, Mercurial.
Also execute Apache maven and acapche ant based projects as well as scheduling by corn-jobs and windows batch commands.
Jenkins is security depends on the below factors
- Access control – It can be customized of user authentication and authorization.
- External threats – Such as malicious builds and CSRF(Cross-site request forgery ) attacks is supported.
Features Of Jenkins
- It is easy to installation and configuration.
- It is simple, user-friendly opensource tool.
- Rich plugin Eco system.
- Distributed builds.
Jenkins Installation and Configuration
We can install Jenkins two ways on RHEL/Centos through a repo or repositroy and the WAR file.
Before going to install and configure the Jenkins first need to setup JAVA on server.
[root@lab ~]# yum -y install java-1.8.0-openjdk wget Total download size: 32 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/3): wget-1.14-15.el7.x86_64.rpm | 547 kB 00:00 (2/3): java-1.8.0-openjdk-22.214.171.124-0.b01.el7_4.x86_64.rpm | 238 kB 00:00 (3/3): java-1.8.0-openjdk-headless-126.96.36.199-0.b01.el7_4.x | 32 MB 00:01 -------------------------------------------------------------------------------- Complete!
To check java version
[root@lab ~]# java -version openjdk version "1.8.0_144"
By default Jenkins package is not available on the RHEL/Centos repositories. So that need to add and import the jenkins repository on machine by using below commands.
[root@lab ~]# cd /etc/yum.repos.d/ [root@lab yum.repos.d]# wget https://pkg.jenkins.io/redhat-stable/jenkins.repo [root@lab yum.repos.d]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
Now install and Configure the Jenkins
[root@lab ~]# yum -y install jenkins Installed: jenkins.noarch 0:2.60.3-1.1 Complete!
Start and enable the Jenkins service by using below commands
[root@lab ~]# systemctl start jenkins
[root@lab ~]# systemctl enable jenkins
Jenkins runs on port 8080, Enable/Allow port 8080 from firewall by following below commands
[root@lab ~]# firewall-cmd --zone=public --add-port=8080/tcp --permanent success (OR)
[root@lab ~]# firewall-cmd --zone=public --add-service=http --permanent success
[root@lab ~]# firewall-cmd --reload
Go to web browser and type “http://<ip address>:8080” .
Follow the below screenshots.
The Admin password is created and stored in the below file.
[root@lab ~]# cat /var/lib/jenkins/secrets/initialAdminPassword (OR)
[root@lab ~]# grep -A 5 passwd /var/log/jenkins/jenkins.log
Copy the password and insert , click on continue button. Select the option “Install suggested plugins”.
After done with plugin installation it will ask to create Admin user.
Click on “Save and Finish” button.
Start using Jenkins. Jenkins Installation And Configuration on RHEL 7/Centos 7.
HowTo Install ShinySky Packages
Thanks for your wonderful Support and Encouragement