How to install jenkins on centos 7
- Category : Linux Helpline (Easy Guide)
- Posted on : Feb 06, 2019
- Views : 1,818
- By : Vucebte Q.
Jenkins is an open source Continuous Integration tool written in Java. It is used to build and test your software projects continuously making it easier for developers to find and solve defects in a code base rapidly and to automate testing of their builds.
Here i am accessing the server with root privileged. First of all we need to install java since jenkins is a java application. To install java execute the following command.
#yum install java-1.8.0-openjdk-devel
We have to enable the jenkin repository by importing the gpg key using curl.
#curl --silent --location http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo |tee /etc/yum.repos.d/jenkins.repo
Now add the repository to our system and run update so yum will use new repository.
#rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
# yum update
We can install jenkins by using the following command
#yum install jenkins.
After the installation we can start the jenkins using the below command,
#systemctl start jenkins
In order to verify the service has been started,run the command
#systemctl status jenkins
The above command displays an output like this :
systemctl status jenkins
● jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: active (running) since Mon 2019-03-18 07:36:36 UTC; 6s ago
Docs: man:systemd-sysv-generator(8)
Process: 23980 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/jenkins.service
└─24007 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/j...
Now the jenkins is up,we need to configure the firewall inorder to reach jenkins from a web browser.
Jenkins runs on port 8080 by default,so we have to open that port in firewall.
Steps to open the port via command line.
Open the configuration file of csf using vim.
#Vi /etc/csf/csf.conf
Once you are in the configuration file, find “TCP_IN=”, it will be under “# Allow incoming TCP ports”.
TCP_IN=
Within the quotation marks, put the port number 8080.
Close the file and save all changes and now restart the firewall using the command.
#csf -r
Now we’ll visit the jenkins on default port using server domain name or ip address in the web browser.
https://ip or domain:8080
It loads a screen similar to the given image which asks you to provide administrator password. You can obtain the password from the command line as
#cat /var/lib/jenkins/secrets/initialAdminPassword
copy the password from the terminal and paste it into the Administrator password. By clicking continue, a next screen loads and presents the option to “install suggested plugins or select plugins to install”. We’ll go for the “Install suggested plugins” option, which will immediately begin the installation process.
After the installation,a new screen will be prompted to create first admin user.
Once the first admin user is in place,we can see a “Jenkins is ready!” confirmation screen.
Categories
- cPanel Question 47
- cPanel Software Management 29
- cPanel Tutorials 13
- Development 29
- Domain 13
- General 19
- Linux Helpline (Easy Guide) 156
- Marketing 47
- MySQL Question 13
- News 2
- PHP Configuration 14
- SEO 4
- SEO 42
- Server Administration 84
- SSL Installation 54
- Tips and Tricks 24
- VPS 3
- Web Hosting 44
- Website Security 22
- WHM questions 13
- WordPress 148
Subscribe Now
10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!Archive Calendar
Sat | Sun | Mon | Tue | Wed | Thu | Fri |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Recent Articles
-
Posted on : Sep 17
-
Posted on : Sep 10
-
Posted on : Aug 04
-
Posted on : Apr 01
Tags
- ts
- myisam
- vpn
- sql
- process
- kill
- tweak
- server load
- attack
- ddos mitigation
- Knowledge
- layer 7
- ddos
- webmail
- DMARC
- Development
- nginx
- seo vpn
- Hosting Security
- wireguard
- innodb
- exim
- smtp relay
- smtp
- VPS Hosting
- cpulimit
- Plesk
- Comparison
- cpu
- encryption
- WHM
- xampp
- sysstat
- optimize
- cheap vpn
- php-fpm
- mariadb
- apache
- Small Business
- Error
- Networking
- VPS
- SSD Hosting
- Link Building
- centos
- DNS
- optimization
- ubuntu