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
$ 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
$ 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
$ cd /opt/
$ sudo wget https://mirrors.estointernet.in/apache/tomcat/tomcat-9/v9.0.37/bin/apache-tomcat-9.0.37.tar.gz
$ 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/
$ 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
No comments:
Post a Comment