{"id":81322,"date":"2022-03-22T02:46:14","date_gmt":"2022-03-22T08:16:14","guid":{"rendered":"https:\/\/www.whizlabs.com\/blog\/?p=81322"},"modified":"2023-11-15T01:31:02","modified_gmt":"2023-11-15T07:01:02","slug":"jenkins-tutorial-for-beginners","status":"publish","type":"post","link":"https:\/\/www.whizlabs.com\/blog\/jenkins-tutorial-for-beginners\/","title":{"rendered":"How to Install Jenkins on Amazon EC2 (Amazon Linux AMI) ?"},"content":{"rendered":"<p>If you are preparing for <a href=\"https:\/\/www.whizlabs.com\/certified-jenkins-engineer\/\"><strong>Jenkins Certification<\/strong><\/a>, this Jenkins Tutorial for Beginners helps you to understand the basics of Jenkins installation on Amazon EC2. To learn about Jenkins in detail, you have to enroll in a <strong>Jenkins Certification Course<\/strong> which assists you to pass the actual certification exam within the first attempt.<\/p>\n<p>If you spend more time on your learning, its easy to face your actual exam. In this article, let us learn how to download and install Jenkins on the Amazon EC2 instance. Here, we will use Amazon Linux AMI.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-left counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #ea7e02;color:#ea7e02\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #ea7e02;color:#ea7e02\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.whizlabs.com\/blog\/jenkins-tutorial-for-beginners\/#Prerequisites\" >Prerequisites<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.whizlabs.com\/blog\/jenkins-tutorial-for-beginners\/#Step_1_Create_an_Amazon_EC2_instance\" >Step 1 : Create an Amazon EC2 instance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.whizlabs.com\/blog\/jenkins-tutorial-for-beginners\/#Step_2_Download_and_Install_Jenkins_on_EC2_Instance\" >Step 2 : Download and Install Jenkins on EC2 Instance<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.whizlabs.com\/blog\/jenkins-tutorial-for-beginners\/#Step_3_Access_Jenkins_via_Browser\" >Step 3 : Access Jenkins via Browser<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.whizlabs.com\/blog\/jenkins-tutorial-for-beginners\/#Summary\" >Summary<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Prerequisites\"><\/span>Prerequisites<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Before starting to install Jenkins, let us see what kind of environment is needed to perform this task.<\/p>\n<ul>\n<li>Amazon Web Services (AWS) account credentials or IAM user credentials<\/li>\n<li>An amazon EC2 instance with internet access<\/li>\n<li>EC2 key-pair to connect via SSH<\/li>\n<li>Java installed on the instance<\/li>\n<\/ul>\n<p>Let&#8217;s start with creating an instance. In my case, I am using Whizlabs&#8217;s Hands-On Labs environment to create an EC2 instance. If you already have an EC2 instance created, you can skip this step and connect via SSH and start downloading Jenkins.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81323 size-full\" title=\"amazon elastic compute cloud (ec2)\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env.png\" alt=\"amazon elastic compute cloud (ec2)\" width=\"1426\" height=\"715\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env.png 1426w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env-300x150.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env-1024x513.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env-768x385.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env-838x420.png 838w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env-640x321.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/whizlabs_lab_env-681x341.png 681w\" sizes=\"(max-width: 1426px) 100vw, 1426px\" \/><\/p>\n<p>If you need a temporary AWS credentials to perform this task, you can also use Whizlabs&#8217;s <a href=\"http:\/\/whizlabs.com\/labs\" target=\"_blank\" rel=\"noopener\">Hands-On Labs<\/a>. I assume that you have an AWS credentials ready. Let&#8217;s start creating an instance.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_1_Create_an_Amazon_EC2_instance\"><\/span>Step 1 : Create an Amazon EC2 instance<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Login to <a href=\"https:\/\/aws.amazon.com\/console\/\" target=\"_blank\" rel=\"noopener\">AWS console<\/a> and navigate to EC2 dashboard.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81327 size-full\" title=\"navigate ec2 dashboard aws console\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2.png\" alt=\"navigate ec2 dashboard aws console\" width=\"1432\" height=\"715\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2.png 1432w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2-300x150.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2-1024x511.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2-768x383.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2-841x420.png 841w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2-640x320.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/navigate_ec2-681x340.png 681w\" sizes=\"(max-width: 1432px) 100vw, 1432px\" \/><\/p>\n<p>Click on the &#8220;Launch Instance&#8221; and select the image type, instance type and fill the other necessary details. In my case, I am using Amazon Linux.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81328 size-full\" title=\"select ami aws console\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami.png\" alt=\"select ami aws console\" width=\"1427\" height=\"716\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami.png 1427w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami-300x151.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami-1024x514.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami-768x385.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami-837x420.png 837w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami-640x321.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/select_ami-681x342.png 681w\" sizes=\"(max-width: 1427px) 100vw, 1427px\" \/><\/p>\n<p>Let&#8217;s configure a security group. We will be installing Jenkins on this instance. By default, the Jenkins installation will run on the ports 8080 and 8443. So, in order to access the Jenkins after installation, we need to allow the port 8080 in our security group. Jenkins port can be changed later if needed. For now, let&#8217;s allow 8080 and launch the instance.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81330 size-full\" title=\"AWS ec2 configure sg security group\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg.png\" alt=\"AWS ec2 configure sg security group\" width=\"1425\" height=\"674\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg.png 1425w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg-300x142.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg-1024x484.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg-768x363.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg-888x420.png 888w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg-640x303.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2-configure-sg-681x322.png 681w\" sizes=\"(max-width: 1425px) 100vw, 1425px\" \/><\/p>\n<p>Download the keypair (which we will be using to connect via SSH) and launch the instance.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81331 size-full\" title=\"AWS ec2 download keypair\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download.png\" alt=\"AWS ec2 download keypair\" width=\"1422\" height=\"712\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download.png 1422w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download-300x150.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download-1024x513.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download-768x385.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download-839x420.png 839w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download-640x320.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/keypair_download-681x341.png 681w\" sizes=\"(max-width: 1422px) 100vw, 1422px\" \/><\/p>\n<p>Now, we are done. We have successfully launched our EC2 instance. You should be able to see the instance status as running on the dashboard.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81332 size-full\" title=\"AWS ec2 dashboard running\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard.png\" alt=\"AWS ec2 dashboard running\" width=\"1426\" height=\"714\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard.png 1426w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard-300x150.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard-1024x513.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard-768x385.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard-839x420.png 839w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard-640x320.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ec2_running_dashboard-681x341.png 681w\" sizes=\"(max-width: 1426px) 100vw, 1426px\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_2_Download_and_Install_Jenkins_on_EC2_Instance\"><\/span>Step 2 : Download and Install Jenkins on EC2 Instance<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Okay, now we have our instance ready. Let&#8217;s connect to the instance and start installing Jenkins on it.<\/p>\n<p>If you are on Windows system, you may need to use Putty to connect to the instance via SSH. I&#8217;m on Mac, so I am going to use my mac terminal and connect to the instance using the keyfile we have downloaded in the previous step.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81335 size-full\" title=\"AWS ec2 connect via ssh\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal.png\" alt=\"AWS ec2 connect via ssh\" width=\"1029\" height=\"491\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal.png 1029w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal-300x143.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal-1024x489.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal-768x366.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal-880x420.png 880w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal-640x305.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connect_terminal-681x325.png 681w\" sizes=\"(max-width: 1029px) 100vw, 1029px\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81343 size-full\" title=\"AWS ec2 connected via ssh\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected.png\" alt=\"AWS ec2 connected via ssh\" width=\"1212\" height=\"504\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected.png 1212w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected-300x125.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected-1024x426.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected-768x319.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected-1010x420.png 1010w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected-640x266.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/ssh_connected-681x283.png 681w\" sizes=\"(max-width: 1212px) 100vw, 1212px\" \/><\/p>\n<p>Now, we have connected to our instance and we are on the Linux system which we have created. Let&#8217;s run the following command to update the packages.<\/p>\n<pre class=\"text-white bg-dark\">sudo yum update<\/pre>\n<p>We need to install Java on the instance. Let&#8217;s install Java by running the following command.<\/p>\n<pre class=\"text-white bg-dark\">sudo yum install java-1.8.0-openjdk<\/pre>\n<p>Click on yes when prompted and it will install Java. Run the following command to make sure the Java is installed.<\/p>\n<pre class=\"text-white bg-dark\">java -version<\/pre>\n<p>Now, <a href=\"https:\/\/www.jenkins.io\/download\/\" target=\"_blank\" rel=\"noopener\">download latest Jenkins packages<\/a> from Jenkins website. At the time of writing this article, Jenkins 2.319.3 is the latest version available.<\/p>\n<p>Run the following commands to download the package.<\/p>\n<pre class=\"text-white bg-dark\">sudo wget -O \/etc\/yum.repos.d\/jenkins.repo https:\/\/pkg.jenkins.io\/redhat-stable\/jenkins.repo<\/pre>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81346 size-full\" title=\"download jenkins command\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd.png\" alt=\"download jenkins command\" width=\"1217\" height=\"577\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd.png 1217w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd-300x142.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd-1024x485.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd-768x364.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd-886x420.png 886w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd-640x303.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/download_jenkins_cmd-681x323.png 681w\" sizes=\"(max-width: 1217px) 100vw, 1217px\" \/><\/p>\n<p>Now, run the below command to import a keyfile from Jenkins to enable installation from the downloaded package.<\/p>\n<pre class=\"text-white bg-dark\">sudo rpm --import https:\/\/pkg.jenkins.io\/redhat-stable\/jenkins.io.key<\/pre>\n<p>Run the below commands which will install the Jenkins. Click yes when prompted.<\/p>\n<pre class=\"text-white bg-dark\">sudo yum install epel-release<\/pre>\n<pre class=\"text-white bg-dark\">sudo yum install java-11-openjdk-devel<\/pre>\n<pre class=\"text-white bg-dark\">sudo yum install jenkins<\/pre>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81347 size-full\" title=\"install jenkins command\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command.png\" alt=\"install jenkins command\" width=\"1213\" height=\"611\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command.png 1213w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command-300x151.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command-1024x516.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command-768x387.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command-834x420.png 834w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command-640x322.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-jenkins-command-681x343.png 681w\" sizes=\"(max-width: 1213px) 100vw, 1213px\" \/><\/p>\n<p>Jenkins has been installed successfully. To start the Jenkins, run the following command.<\/p>\n<pre class=\"text-white bg-dark\">sudo service jenkins start<\/pre>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81348 size-full\" title=\"jenkins start command\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok.png\" alt=\"jenkins start command\" width=\"1183\" height=\"512\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok.png 1183w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok-300x130.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok-1024x443.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok-768x332.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok-970x420.png 970w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok-640x277.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-start-command-ok-681x295.png 681w\" sizes=\"(max-width: 1183px) 100vw, 1183px\" \/><\/p>\n<p>If you see the output as [OK] then the Jenkins service is now started and we have done with our installation.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step_3_Access_Jenkins_via_Browser\"><\/span>Step 3 : Access Jenkins via Browser<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To access the Jenkins on a browser, copy the public IP address of your EC2 instance and go to the port 8080.<\/p>\n<p>http:\/\/ec2-public-ip:8080\/<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81350 size-full\" title=\"unlock jenkins page\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins.png\" alt=\"unlock jenkins page\" width=\"1425\" height=\"791\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins.png 1425w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins-300x167.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins-1024x568.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins-768x426.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins-757x420.png 757w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins-640x355.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlock-jenkins-681x378.png 681w\" sizes=\"(max-width: 1425px) 100vw, 1425px\" \/><\/p>\n<p>You should be able to see the above page if you are following along with me. Now, we need to unlock Jenkins by using an admin password. To fetch the admin password, run the following commands:<\/p>\n<pre class=\"text-white bg-dark\">sudo su<\/pre>\n<pre class=\"text-white bg-dark\">cd \/var\/lib\/jenkins\/secrets\/<\/pre>\n<pre class=\"text-white bg-dark\">cat initialAdminPassword<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81353 size-full\" title=\"jenkins secret\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets.png\" alt=\"jenkins secret\" width=\"1199\" height=\"499\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets.png 1199w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets-300x125.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets-1024x426.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets-768x320.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets-1009x420.png 1009w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets-640x266.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/jenkins-secrets-681x283.png 681w\" sizes=\"(max-width: 1199px) 100vw, 1199px\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81355 size-full\" title=\"get admin password command jenkins\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password.png\" alt=\"get admin password command jenkins\" width=\"1186\" height=\"546\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password.png 1186w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password-300x138.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password-1024x471.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password-768x354.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password-912x420.png 912w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password-640x295.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/get-admin-password-681x314.png 681w\" sizes=\"(max-width: 1186px) 100vw, 1186px\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81352 size-full\" title=\"unlock jenkins\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword.png\" alt=\"unlock jenkins\" width=\"1424\" height=\"791\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword.png 1424w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword-300x167.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword-1024x569.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword-768x427.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword-756x420.png 756w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword-640x356.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/unlockwithpassword-681x378.png 681w\" sizes=\"(max-width: 1424px) 100vw, 1424px\" \/><\/p>\n<p>Install suggested plugins.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81356 size-full\" title=\"install jenkins plugin\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins.png\" alt=\"install jenkins plugin\" width=\"1426\" height=\"792\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins.png 1426w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins-300x167.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins-1024x569.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins-768x427.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins-756x420.png 756w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins-640x355.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/install-suggested-plugins-681x378.png 681w\" sizes=\"(max-width: 1426px) 100vw, 1426px\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81358 size-full\" title=\"getting started with jenkins\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started.png\" alt=\"getting started with jenkins\" width=\"1430\" height=\"790\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started.png 1430w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started-300x166.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started-1024x566.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started-768x424.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started-760x420.png 760w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started-640x354.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/getting-started-681x376.png 681w\" sizes=\"(max-width: 1430px) 100vw, 1430px\" \/><\/p>\n<p>We just need to create a first admin user and we are ready to play with Jenkins now.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81360 size-full\" title=\"create jenkins admin user \" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin.png\" alt=\"create jenkins admin user \" width=\"1416\" height=\"791\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin.png 1416w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin-300x168.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin-1024x572.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin-768x429.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin-752x420.png 752w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin-640x358.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/create-admin-681x380.png 681w\" sizes=\"(max-width: 1416px) 100vw, 1416px\" \/><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-81362 size-full\" title=\"welcome to jenkins\" src=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins.png\" alt=\"welcome to jenkins\" width=\"1426\" height=\"792\" srcset=\"https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins.png 1426w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins-300x167.png 300w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins-1024x569.png 1024w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins-768x427.png 768w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins-756x420.png 756w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins-640x355.png 640w, https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/welcome-to-jenkins-681x378.png 681w\" sizes=\"(max-width: 1426px) 100vw, 1426px\" \/><\/p>\n<blockquote><p>Also Read : <a href=\"https:\/\/www.whizlabs.com\/blog\/jenkins-introduction\/\" target=\"_blank\" rel=\"noopener\">Getting Started: Introduction to Jenkins<\/a><\/p><\/blockquote>\n<h3><span class=\"ez-toc-section\" id=\"Summary\"><\/span>Summary<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Hope you have enjoyed this detailed Jenkins tutorial. We have learned how to install and configure Jenkins on amazon EC2 in this article. This article covers some of the topics in CloudBees Jenkins certification exam syllabus. We will learn how to create Jenkins jobs, builds and pipelines in upcoming articles. Stay tuned. Thanks for reading!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are preparing for Jenkins Certification, this Jenkins Tutorial for Beginners helps you to understand the basics of Jenkins installation on Amazon EC2. To learn about Jenkins in detail, you have to enroll in a Jenkins Certification Course which assists you to pass the actual certification exam within the first attempt. If you spend more time on your learning, its easy to face your actual exam. In this article, let us learn how to download and install Jenkins on the Amazon EC2 instance. Here, we will use Amazon Linux AMI. Prerequisites Before starting to install Jenkins, let us see [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":81687,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"default","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1862],"tags":[4840],"class_list":["post-81322","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","tag-jenkins-certification"],"uagb_featured_image_src":{"full":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",600,315,false],"thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2-150x150.png",150,150,true],"medium":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2-300x158.png",300,158,true],"medium_large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",600,315,false],"large":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",600,315,false],"1536x1536":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",600,315,false],"2048x2048":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",600,315,false],"profile_24":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",24,13,false],"profile_48":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",48,25,false],"profile_96":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",96,50,false],"profile_150":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",150,79,false],"profile_300":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",300,158,false],"tptn_thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2-250x250.png",250,250,true],"web-stories-poster-portrait":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",600,315,false],"web-stories-publisher-logo":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",96,50,false],"web-stories-thumbnail":["https:\/\/www.whizlabs.com\/blog\/wp-content\/uploads\/2022\/03\/How-to-install-Jenkins-on-Amazon-EC2.png",150,79,false]},"uagb_author_info":{"display_name":"Dharmalingam N","author_link":"https:\/\/www.whizlabs.com\/blog\/author\/dharmalingam\/"},"uagb_comment_info":0,"uagb_excerpt":"If you are preparing for Jenkins Certification, this Jenkins Tutorial for Beginners helps you to understand the basics of Jenkins installation on Amazon EC2. To learn about Jenkins in detail, you have to enroll in a Jenkins Certification Course which assists you to pass the actual certification exam within the first attempt. If you spend&hellip;","_links":{"self":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/81322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/comments?post=81322"}],"version-history":[{"count":13,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/81322\/revisions"}],"predecessor-version":[{"id":92012,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/posts\/81322\/revisions\/92012"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media\/81687"}],"wp:attachment":[{"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/media?parent=81322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/categories?post=81322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whizlabs.com\/blog\/wp-json\/wp\/v2\/tags?post=81322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}