{"id":14181,"date":"2023-05-12T18:43:10","date_gmt":"2023-05-12T18:43:10","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=14181"},"modified":"2023-04-29T07:33:56","modified_gmt":"2023-04-29T07:33:56","slug":"how-to-install-jenkins-on-ubuntu","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-jenkins-on-ubuntu\/","title":{"rendered":"How to Install Jenkins on Ubuntu"},"content":{"rendered":"<p>Jenkins is an open-source automation server that can be used to automate software builds, tests, and deployments. In this guide, we will go through the steps to install Jenkins on Ubuntu.<\/p>\n<h2>Step 1: Update the Package List<\/h2>\n<p>Before installing Jenkins, it is recommended to update the package list on your Ubuntu machine. You can do this by running the following command:<\/p>\n<pre>\r\nsudo apt update\r\n<\/pre>\n<h2>Step 2: Install Java<\/h2>\n<p>Jenkins requires Java to run. You can install Java on Ubuntu using the following command:<\/p>\n<pre>\r\nsudo apt install default-jdk\r\n<\/pre>\n<p>This will install the default version of Java on your Ubuntu machine.<\/p>\n<h2>Step 3: Add Jenkins Repository Key and Source<\/h2>\n<p>Next, you need to add the Jenkins repository key to your system using the following command:<\/p>\n<pre>\r\nwget -q -O - https:\/\/pkg.jenkins.io\/debian-stable\/jenkins.io.key | sudo apt-key add -\r\n<\/pre>\n<p>After adding the key, you can add the Jenkins repository source to your system using the following command:<\/p>\n<pre>\r\nsudo sh -c 'echo deb https:\/\/pkg.jenkins.io\/debian-stable binary\/ > \/etc\/apt\/sources.list.d\/jenkins.list'\r\n<\/pre>\n<h2>Step 4: Install Jenkins<\/h2>\n<p>Once you have added the Jenkins repository key and source, you can proceed with the installation of Jenkins by using the following commands:<\/p>\n<pre>\r\nsudo apt update\r\nsudo apt install jenkins\r\n<\/pre>\n<p>This will install Jenkins on your Ubuntu machine.<\/p>\n<h2>Step 5: Start and Enable Jenkins<\/h2>\n<p>After installing Jenkins, you can start and enable the Jenkins service using the following commands:<\/p>\n<pre>\r\nsudo systemctl start jenkins\r\nsudo systemctl enable jenkins\r\n<\/pre>\n<p>This will start the Jenkins service and enable it to start automatically at boot time.<\/p>\n<h2>Step 6: Access Jenkins Web Interface<\/h2>\n<p>To access the Jenkins web interface, open your web browser and enter the following URL:<\/p>\n<pre>\r\nhttp:\/\/your_server_ip_or_domain_name:8080\r\n<\/pre>\n<p>Replace &#8220;your_server_ip_or_domain_name&#8221; with the IP address or domain name of your Ubuntu machine. You will be prompted to enter the initial admin password, which can be found in the following file:<\/p>\n<pre>\r\n\/var\/lib\/jenkins\/secrets\/initialAdminPassword\r\n<\/pre>\n<p>Follow the instructions on the Jenkins web interface to complete the installation.<\/p>\n<h2>Conclusion:<\/h2>\n<p>In this guide, we have outlined the steps to install Jenkins on Ubuntu. By following these steps, you can now use Jenkins to automate software builds, tests, and deployments on your Ubuntu machine. If you have any questions or suggestions, feel free to comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins is an open-source automation server that can be used to automate software builds, tests, and deployments. In this guide, we will go through the steps to install Jenkins on&#8230;<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[996,1073],"tags":[1975,2054,1856],"class_list":["post-14181","post","type-post","status-publish","format-standard","hentry","category-linux","category-ubuntu","tag-install","tag-jenkins","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/14181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=14181"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/14181\/revisions"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=14181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=14181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=14181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}