Showing posts with label jenkins. Show all posts
Showing posts with label jenkins. Show all posts

Sunday, September 6, 2020

Jenkins Instllation using Binary and Distribution methods in Ubuntu

Jenkins is an Open Source automation server. It helps to automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery. It is a server based system that runs in servlet containers such as Apache Tomcat ...

PreRequisites:

To setup the Jenkins as a prerequisite we need java need to install in the server and then setup the Jenkins.

      Step 1: Setting up the openjdk repo in machine

         $ cd /opt
         $ sudo add-apt-repository ppa:openjdk-r/ppa

      Step 2: update the OS after adding repo and Install jdk 8
         
         $ sudo apt update
         $ sudo apt install openjdk-8-jdk

Jenkins installation using Binary:

     Step 3:  Download and install the necessary GPG key with the command

         $ sudo wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -

     Step 4: Add the necessary repository with the command

         $  sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'  

    Step 5: Update apt with the command 

        $ sudo apt-get update

    Step 6: Install Jenkins with the command 

        $ sudo apt-get install jenkins -y

    Step 7:  Start the Jenkins Service

        $ sudo systemctl start jenkins


Jenkins Installation using Distribution method

Tomcat Installation:    from https://tomcat.apache.org/download-90.cgi

    Step 1: Install the tomcat from above URL

        $ cd /opt/

    Step 2: Un tar the downloaded file and change the directory name

        $ tar -xvzf apache-tomcat-9.0.37.tar.gz -C /opt

        $ mv /opt/apache-tomcat-9.0.37/ /opt/tomcat

        $ cd tomcat/bin

    Step 3: Change the mode od directory, give the execution permission for user in current bin directory.

        $ sudo chmod u+x *  

Jenins Installation:   from https://updates.jenkins-ci.org/

    Step 4: Install the jenkins.war file from above url

    Step 5: Move the Jenkins.war file to /opt/tomcat/webapps

        $ sudo mv /opt/jenkins.war /opt/tomcat/webapps/

        $ sudo apt update

        $ cd /opt/tomcat/bin

    Step 6: Start the jenkins from the current directory (/opt/tomcat/bin) 

        $ sudo sh startup.sh



Featured Post

Ansible Tool Introduction

                                                                                                                                    Next ...