Jenkins is a free and open source automation server. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery.
Let’s begin with installation of jenkins on Linux based server.
- Login to server and install the java or update the java if it’s already exists. As Jenkins runs on Java.
[opc@bastion filesys]$ sudo yum -y install java
Loaded plugins: langpacks, priorities, ulninfo, versionlock
9 packages excluded due to repository priority protections
Excluding 2 updates due to versionlock (use "yum versionlock status" to show them)
Package 2000:jdk1.8-1.8.0_231-fcs.x86_64 already installed and latest version
Nothing to do
- After Java installation, we must have the Jenkins YUM repository available.
[opc@bastion filesys]$ sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo Resolving pkg.jenkins-ci.org (pkg.jenkins-ci.org)... 52.202.51.185 Connecting to pkg.jenkins-ci.org (pkg.jenkins-ci.org)|52.202.51.185|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 71 Saving to: ‘/etc/yum.repos.d/jenkins.repo’ 100%[===================================================>] 71 --.-K/s in 0s 2020-02-19 13:27:26 (7.84 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [71/71] [opc@bastion filesys]$ sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key [opc@bastion filesys]$ sudo yum -y install jenkins Loaded plugins: langpacks, priorities, ulninfo, versionlock jenkins | 2.9 kB 00:00:00 jenkins/primary_db | 139 kB 00:00:00 9 packages excluded due to repository priority protections Excluding 2 updates due to versionlock (use "yum versionlock status" to show them) Resolving Dependencies --> Running transaction check ---> Package jenkins.noarch 0:2.220-1.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================= Package Arch Version Repository Size ============================================================================================= Installing: jenkins noarch 2.220-1.1 jenkins 63 M Transaction Summary ============================================================================================= Install 1 Package Total download size: 63 M Installed size: 63 M Downloading packages: jenkins-2.220-1.1.noarch.rpm | 63 MB 00:00:02 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : jenkins-2.220-1.1.noarch 1/1 Verifying : jenkins-2.220-1.1.noarch 1/1 Installed: jenkins.noarch 0:2.220-1.1
- Add the HTTP port number and Restart the Jenkins. In my case, I am using port 31308.
[opc@bastion filesys]$ sudo vi /etc/default/jenkins [opc@bastion filesys]$ sudo cat /etc/default/jenkins HTTP_PORT="31808" JENKINS_ARGS="--httpPort=31808" [opc@jenkinsserver filesys]$ sudo service jenkins restart Restarting jenkins (via systemctl): [ OK ] [opc@jenkinsserver filesys]$
- Now, add Jenkins to allow traffic from firewall.
[opc@bastion filesys]$ sudo firewall-cmd --permanent --zone=public --add-service=jenkins success [opc@jenkinsserver filesys]$ sudo firewall-cmd --reload success [opc@bastion filesys]$
- To obtain the administrator password, will use in next step.
[opc@bastion filesys]$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
870f5bf9ecc6419cb05355e7fe22848f
[opc@bastion filesys]$
- Go to browser, using public IP with assigned port number, open the URL.
http://bastion.vms.sass.ro:31308/
- After providing the password, click Continue.
- Now Click on Install suggested Plugins
- After the completion, you can create your admin user for all upcoming activities in Jenkins and Press on “Save and Continue” Button.
- In instance configuration, copy the Jenkins URL and click on “Save and Finish“.
- In last wizard, Click on “Start using Jenkins”.
Here the Jenkins installation is completed. In the next post, we can install OCI plugin for Oracle Cloud.
Thank you for giving your valuable time to read the above information.
If you want to be updated with all our articles send us the Invitation or Follow us:
Telegram Channel: https://t.me/helporacle
Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/
LinkedIn Group: Oracle Cloud DBAAS
Facebook Page: OracleHelp