{"id":689,"date":"2018-10-18T12:06:40","date_gmt":"2018-10-18T12:06:40","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=689"},"modified":"2018-10-18T15:49:50","modified_gmt":"2018-10-18T15:49:50","slug":"install-jenkins-on-centos7-linux-hint","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/18\/install-jenkins-on-centos7-linux-hint\/","title":{"rendered":"Install Jenkins on CentOS7 | Linux Hint"},"content":{"rendered":"<p>Jenkins is a java based open source Continuous Integration (CI) tool used for software development. It is also called automation server for continuous build and deployment. It helps the user to automate the repetitive tasks applied in continuous integration and deployment of the software. It is a very helpful to build and test software or monitor the execution of other externally running jobs. How you can download, install and setup this package in your centos server is shown in this tutorial.<\/p>\n<p>Before starting this tutorial you much do the following tasks.<\/p>\n<ul>\n<li>Make the system up-to-date<\/li>\n<\/ul>\n<p>Run the following command to update the current centos operating system.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/1-7.png\" alt=\"\" width=\"955\" height=\"143\" \/><\/p>\n<ul>\n<li>Install Java<\/li>\n<\/ul>\n<p>Run the following command to check java is installed or not. If java is installed then it will show the version information of installed java. By, default, java is installed on centos server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/2-7.png\" alt=\"\" width=\"1140\" height=\"184\" \/><\/p>\n<p>The above output shows java is installed in the current system and the version is \u201c1.8.0_181\u201d. But if java is not installed in your operating system then run the following command to install java.<\/p>\n<p>$ sudo yum install java-1.8.0-openjdf-devel<\/p>\n<h2>Jenkins Installation<\/h2>\n<h3>Step-1: Download and install Jenkins package<\/h3>\n<p>Go to the following URL address to download the latest package for installing Jenkins.<\/p>\n<p><a href=\"https:\/\/pkg.jenkins.io\/redhat-stable\/\">https:\/\/pkg.jenkins.io\/redhat-stable\/<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/3-7.png\" alt=\"\" width=\"1140\" height=\"513\" \/><\/p>\n<p>After download, install the package by running the following command.<\/p>\n<p>$ sudo yum install jenkins-2.138.1-1.1.noarch.rpm<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/4-6.png\" alt=\"\" width=\"980\" height=\"138\" \/><\/p>\n<p>During the installation, it will ask for permission to start the installation. Type \u2018y\u2019 to start the process.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/5-6.png\" alt=\"\" width=\"977\" height=\"472\" \/><\/p>\n<h3>Step-2: Start and Enable Jenkins Service<\/h3>\n<p>Run the following systemctl commands to start, enable and check the status of Jenkins service.<\/p>\n<p>$ sudo systemctl start jenkins<br \/>\n$ sudo systemctl enable jenkins<br \/>\n$ sudo systemctl status jenkins<\/p>\n<p>The following output will display if all the commands work successfully.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/6-5.png\" alt=\"\" width=\"976\" height=\"374\" \/><\/p>\n<h3>Step-3: Add the ports 8080 in firewall and http service.<\/h3>\n<p>$ sudo firewall-cmd &#8211;zone=public &#8211;add-port=8080\/tcp &#8211;permanent<br \/>\n$ sudo firewall-cmd &#8211;zone=public &#8211;add-service=http &#8211;permanent<br \/>\n$ sudo firewall-cmd \u2013reload<\/p>\n<p>If the 8080 port and http service are enabled properly then the following screen will appear with success message.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/7-5.png\" alt=\"\" width=\"978\" height=\"233\" \/><\/p>\n<p>Step-4: Get the admin password<\/p>\n<p>Run the following command for getting the default password to setup Jenkins. Save the password to use it in the next step.<\/p>\n<p>$ sudo grep -A 5 password \/var\/log\/jenkins\/jenkins.log<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/8-4.png\" alt=\"\" width=\"979\" height=\"236\" \/><\/p>\n<h3>Step-5: Access the Jenkins Web portal<\/h3>\n<p>To start the setup process of Jenkins and open the web portal, type your IP address of the server with port 8080 in the address bar of your browser.<\/p>\n<p>http:\/\/[ip-address]:8080<\/p>\n<p>The IP address of my server is 10.0.2.15. So, I have used the following URL address to access Jenkins web portal.<\/p>\n<p>http:\/\/10.0.2.15:8080<\/p>\n<p>The following screen will appear after entering the URL address. Copy and paste the password that you have saved in the previous step. Click on Continue button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/9-4.png\" alt=\"\" width=\"1140\" height=\"563\" \/><\/p>\n<p>Two option will appear to install plugins. Select \u201cInstall suggested plugins\u201d option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/10-4.png\" alt=\"\" width=\"1140\" height=\"539\" \/><\/p>\n<p>Plugins installation process will start and the following screen will appear. You have to wait for sometimes in this stage.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/11-3.png\" alt=\"\" width=\"1140\" height=\"492\" \/><\/p>\n<p>After completing plugins installation process, it will ask for creating a new admin user account. Create a new user account by filling up the following form and clicking \u2018Save and Continue\u2019 button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/12-3.png\" alt=\"\" width=\"1140\" height=\"490\" \/><\/p>\n<p>In the next step, it will ask for valid Jenkins URL to link with various Jenkins Resources. Enter the URL and click on \u2018Save and Finish\u2019 Button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/13-3.png\" alt=\"\" width=\"1140\" height=\"544\" \/><\/p>\n<p>If all the above steps are completed properly then the following screen will appear.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/14-2.png\" alt=\"\" width=\"1140\" height=\"529\" \/><\/p>\n<p>Click on \u2018Start using Jenkins\u2019 button to open Jenkins dashboard.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/linuxhint.com\/wp-content\/uploads\/2018\/10\/15-1.png\" alt=\"\" width=\"1140\" height=\"542\" \/><\/p>\n<p>If the above screen appear then your Jenkins is properly ready to use. Congratulation.<\/p>\n<p><a href=\"https:\/\/linuxhint.com\/install_jenkins_centos7\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins is a java based open source Continuous Integration (CI) tool used for software development. It is also called automation server for continuous build and deployment. It helps the user to automate the repetitive tasks applied in continuous integration and deployment of the software. It is a very helpful to build and test software or &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/18\/install-jenkins-on-centos7-linux-hint\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install Jenkins on CentOS7 | Linux Hint&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-689","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/689","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/689\/revisions"}],"predecessor-version":[{"id":818,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/689\/revisions\/818"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}