{"id":11830,"date":"2024-03-25T14:41:54","date_gmt":"2024-03-25T09:11:54","guid":{"rendered":"https:\/\/www.skynats.com\/?p=11830"},"modified":"2025-01-08T20:36:54","modified_gmt":"2025-01-08T15:06:54","slug":"jenkins-installation-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/jenkins-installation-on-ubuntu-22-04\/","title":{"rendered":"Jenkins Installation on Ubuntu 22.04"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Jenkins is an open-source continuous integration technology. It simplifies the software development process by creating a pipeline to build, test, and deploy the application. In addition, it is aligned with Linux, Windows, and macOS. Integrated with other DevOps software, Jenkins stands as a popular CI\/CD tool. In order for the Java programme to function properly, it is necessary to have the Java Runtime Environment (JRE) installed on your server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-steps-to-install-jenkins-on-ubuntu-22-04\">Steps to install jenkins on Ubuntu 22.04 :<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1. \u00a0First, install Java on the server by using the instructions below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt-get update\napt install openjdk-11-jdk<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2. To confirm the installation, check the Java version. After executing the command, the output looks something like this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>java --version<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3. &nbsp;Add Jenkins repository using commands below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/pkg.jenkins.io\/debian-stable\/jenkins.io-2023.key | sudo tee \/usr\/share\/keyrings\/jenkins-keyring.asc &gt; \/dev\/null\n\necho deb &#91;signed-by=\/usr\/share\/keyrings\/jenkins-keyring.asc]  https:\/\/pkg.jenkins.io\/debian-stable binary\/ | sudo tee \/etc\/apt\/sources.list.d\/jenkins.list &gt; \/dev\/null\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4. After adding Jenkins repository, update apt packages list using below command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">5. After installing Jenkins on the server, start and enable it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt install jenkins\nsystemctl start jenkins\nsystemctl enable jenkins<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">6. To confirm installation, check the status to ensure. Now run the command, and the output shown as below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status jenkins<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"149\" sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-1-1024x149.png\" alt=\"Jenkins installation\" class=\"wp-image-11844\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-1-1024x149.png 1024w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-1-300x44.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-1-768x111.png 768w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-1-1200x174.png 1200w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-1.png 1289w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">7. To reach jenkins from a browser, configure firewall using below commands and Check the status of ufw to ensure the activation of rules added.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow 8080\nufw allow ssh\nufw enable\nufw status<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">8. After configuring the firewall, the next step is to set up Jenkins. For thi, open a browser and run http:\/\/100.24.34.65:8080 where 100.24.34.65 is the server&#8217;s IP address.  m<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unlock Jenkins page will shown as below;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"569\" sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/unlock-jenkins-1024x569.png\" alt=\"Unlock jenkins page\" class=\"wp-image-11845\" style=\"width:524px;height:auto\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/unlock-jenkins-1024x569.png 1024w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/unlock-jenkins-300x167.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/unlock-jenkins-768x427.png 768w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/unlock-jenkins.png 1037w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">9. As per the instruction for getting admin password to unlock, use cat command as follows<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/var\/lib\/jenkins\/secrets\/initialAdminPassword<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The designated column will receive a copy and paste of the initial admin password, which is a 32-character alphanumeric string.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">10. After it will  open a customised Jenkins page. Installing plugins is demonstrated below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" width=\"1024\" height=\"580\" sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/customize-jenkins-1024x580.png\" alt=\"Customize Jenkins\" class=\"wp-image-11846\" style=\"width:502px;height:auto\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/customize-jenkins-1024x580.png 1024w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/customize-jenkins-300x170.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/customize-jenkins-768x435.png 768w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/customize-jenkins.png 1026w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click one to proceed and install the plugins.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">11.\u00a0As shown, installing plugins prompts the user to create the administrator user.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1018\" height=\"572\" sizes=\"(max-width: 1018px) 100vw, 1018px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/create.png\" alt=\"create first Admin user\" class=\"wp-image-11847\" style=\"width:504px;height:auto\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/create.png 1018w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/create-300x169.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/create-768x432.png 768w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After filling the required fields,click &#8220;Save and continue&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">12. In the next step, you need to setup the url where the Jenkins will get configured to run. Enter domain name or ip address with port 8080 and click &#8220;Save and Finish&#8221; as shown.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"573\" sizes=\"(max-width: 1023px) 100vw, 1023px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-instance-configuration.png\" alt=\" Instance configuration\" class=\"wp-image-11848\" style=\"width:505px;height:auto\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-instance-configuration.png 1023w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-instance-configuration-300x168.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/jenkins-instance-configuration-768x430.png 768w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">13. Now you will get a confirmation message and Click Start using Jenkins. After completing all the steps above, its dashboard will be open and can start your jobs using this tool as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"454\" sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/Jenkind-dashboard-1024x454.png\" alt=\"Jenkins dashboard\" class=\"wp-image-11849\" style=\"width:577px;height:auto\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/Jenkind-dashboard-1024x454.png 1024w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/Jenkind-dashboard-300x133.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/Jenkind-dashboard-768x340.png 768w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/Jenkind-dashboard-1200x532.png 1200w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/03\/Jenkind-dashboard.png 1365w\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now we have successfully installed Jenkins on Ubuntu 22.04<a href=\"https:\/\/ubuntu.com\/\" target=\"_blank\" rel=\"noopener\">.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you run into any issues or hiccups throughout the Jenkins installation process on Ubuntu 22.04, our <a href=\"https:\/\/www.skynats.com\/blog\/\">Support Team<\/a> members are here to help.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins is an open-source continuous integration technology. It simplifies the software development process by creating a pipeline to build, test, and deploy the application. In addition, it is aligned with Linux, Windows, and macOS. Integrated with other DevOps software, Jenkins stands as a popular CI\/CD tool. In order for the Java programme to function properly, [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[832,758,239,68,762],"tags":[831,828],"class_list":["post-11830","post","type-post","status-publish","format-standard","hentry","category-jenkins","category-devops","category-linux","category-server-management","category-ubuntu-22-04","tag-jenkins","tag-ubuntu-22-04"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/11830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=11830"}],"version-history":[{"count":0,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/11830\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=11830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=11830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=11830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}