Khandaker Toihidul Islam
Front-end Developer
React Js | Javascript | HTML | CSS | Bootstrap | Wordpress | PHP | Mysql

Install Jenkins in Linux Sentos Oracle cloud

At first we need to install java 8

sudo yum install java-1.8.0-openjdk-devel

Install jenkins 

sudo yum -y update
sudo wget -O /etc/yum.repos.d/jenkins.repo
sudo rpm –import
sudo yum -y install jenkins

Start jenkins

sudo systemctl daemon-reload
sudo systemctl start jenkins
sudo systemctl status jenkins

‚óŹ jenkins.service - LSB: Start Jenkins at boot time
   Loaded: loaded (/etc/init.d/jenkins; generated)
   Active: active (exited) since Mon 2018-07-09 17:22:08 UTC; 6min ago
     Docs: man:systemd-sysv-generator(8)
    Tasks: 0 (limit: 1153)
   CGroup: /system.slice/jenkins.service

By default, Jenkins listens on port TCP 8080. Open this port on the instance firewall by configuring the firewall.

sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp

sudo firewall-cmd --reload
  • Now Jenkins is configured on the instance. This instance acts as the Jenkins master node. To access this node from the outside internet, open the TCP port 8080 on the security list for the subnet which houses the Jenkins master instance.

Step 2 – Configuring Jenkins Master

  • On the web browser, access Jenkins dashboard using the public IP of the instance and port 8080. You will see the Unlock Jenkins screen, which displays the location of the initial password.   
  • In the terminal window, use the cat command to display the password:

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

  • Copy the 32-character alphanumeric password from the terminal and paste it into the Administrator password field, then click Continue. The next screen presents the option of installing suggested plugins or selecting specific plugins.
  • Go ahead and install the suggested plugins.
  • When the installation is complete, you are prompted to set up the first administrative user. You can skip this step and continue as an admin using the initial password used in the previous step. Here, we proceed as admin. You should see a Jenkins is ready! confirmation screen. Click Start using Jenkins to visit the main Jenkins dashboard. At this point, basic configuration of Jenkins master has been successfully completed.

You may also like...

Leave a Reply