Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. 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



Friday, April 17, 2020

Install Ant in Ubuntu 16.04/18.04/20.04 Machine

APACHE ANT
  • ANT stands for another neat tools
  • It is java based build tool from Apache Software Fundation
  • Ant uses build.xml file 
  • Ant was created by james duncan davidson
Ant- Build Files:
  • Ants build file is called build.xml should reside in base directory(base directory means where the source code will maintained) of the project
  • In build.xml or any xml file it start with an xml tag project name and target a single project can have multiple targets
  • There should be no blank lines or white spaces before the xml declaration

Installation: 

    We can install ANT in different ways, those are 1. Using "apt" command module
                                                                                 2. Using "distribution method"

Here, we will see both the ways how to install ANT.

Prerequisites: 

Java should be install in the server.

Step 1: Update the Server 

$ sudo apt update -y 
Step 2: Install Java latest version, basically this command will install JAVA Runtime Environment
$ sudo apt install default-jre
Install Apache ANT in Ubuntu using "apt" command module
Step 3:  Update the Server Install Ant
$ sudo apt update 
$ sudo apt install ant -y
To verify the Ant installation
$ ant -version
Install Apache Ant Using "Distribution Method"
Step 1: Enter into the "opt" directory
cd /opt/
Step 2:  Download the tar or zap source file from http://ant.apache.org/bindownload.cgi
$ sudo wget http://mirrors.estointernet.in/apache//ant/binaries/apache-ant-1.10.5-bin.zip
Step 3:  Exatract the zip file or tar file
unzip apache-ant-1.10.5-bin.zip
Step 4: Add the ANT_HOME path.
$ sudo ANT_HOME=/opt/apache-ant-1.10.5
Step 5:  Now export the PATH
$ sudo PATH=$PATH:${ANT_HOME}/bin
Step 6: Now enter into the apache-ant-1.10.5
cd apache-ant-1.10.5
Step 7:  Now, Run the below command to start the "Build"
$ sudo ant -f fetch.xml -Ddest=system


Featured Post

Ansible Tool Introduction

                                                                                                                                    Next ...