WeirdTechie.
  • Home
  • BioLy
  • Video Downloader
  • Apps & Games
  • Contact
  • About
No Result
View All Result
WeirdTechie.
  • Home
  • BioLy
  • Video Downloader
  • Apps & Games
  • Contact
  • About
No Result
View All Result
Weirdtechie.
No Result
View All Result

How To Install Jenkins In Ec2 Instance

Deep vempati by Deep vempati
January 30, 2022
in Guide, How-To
Reading Time: 6 mins read
0
how to install jenkins in ec2 instance
70
SHARES
390
VIEWS
Share on Whatsapp

Hi guys, in this article I am going to show you how to install jenkins in ec2 instance.

Install Jenkins on AWS EC2

Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X, and other Unix-like operating systems. As an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project.

You might also like

Linux Commands basic

Top 50 Linux commands Basic To Advance

April 2, 2022
Do credit card generators really work?

Do credit card generators really work? Legit or Fake review.

November 19, 2021

Prerequisites

If you don’t have an AWS account follow this step-by-step guide to create AWS account.

You can follow the same on your Linux distribution as well and if you have any doubts feel free to ask in the comment section.

If you use any cloud provider like AWS, Azure or GCP make sure you have created RedHat Linux distribution and make sure you have enabled internet access and port 8080 in security groups

EC2 RHEL 7.x Instance(Can be used any other instance)

  • With Internet Access
  • Security Group with Port 8080 open for internet
  • Java v1.8.x

Install Java

We will be using open java as a demo, But you can get the latest version by clicking here

 yum install java-1.8*

OR

 yum -y install java-1.8.0-openjdk

Confirm Java Version

After installing java, check the java is installed or not by typing the below command

java -version

Now we have to set the Java Path in the .bash_profile

You have to find the java path in your Linux and most of the time the java store in this path /usr/lib/jvm/java-1.8*

You can check on your system by going into the path and typing pwd to know the current working directory or type the below command before saving it in .bash_profile

find /usr/lib/jvm/java-1.8* | head -n 3

once you have the exact java home path go to /home/ec2-user/ and type vi /.bash_profile then any .bash_profile will open type I and paste the below code and make sure java-1.8.0-OpenJDK-1.8.0.191.b12-1.el7_6.x86_64 this version should be changed to your current java version you can find the file name in /usr/lib/jvm/

java path for jenkins
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64

PATH=$PATH:$JAVA_HOME

Once you paste the above command press ESC and type “:wq!” Then you will get back to the home terminal.

To set it permanently update your .bash_profile

source ~/.bash_profile
  java -version

The output should be something like this,

openjdk version “1.8.0_151”

OpenJDK Runtime Environment (build 1.8.0_151-b12)

OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

java version

How to Install Jenkins In Ec2 Instance

You can install Jenkins using the rpm or by setting up the repo. We will set up the repo so that we can update it easily in the future. Get the latest version of Jenkins from https://pkg.jenkins.io/redhat-stable/


yum -y install wget

wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

rpm --import <a href="https://pkg.jenkins.io/redhat-stable/jenkins.io.key">https://pkg.jenkins.io/redhat-stable/jenkins.io.key

If you are using the Amazon EC2 instance just like me you have to type the below command before installing the Jenkins

yum install epel-release 

sudo amazon-linux-extras install epel

The above command is to the repository that provides ‘daemonize’

Jenkins install
yum -y install jenkins

Start Jenkins

# Start jenkins service

systemctl start jenkins
Jenkins service start

# Setup Jenkins to start at boot,

systemctl enable jenkins

Accessing Jenkins

By default Jenkins runs at port 8080, You can access Jenkins at

http://YOUR-SERVER-PUBLIC-IP:8080

Configure Jenkins

  • The default Username is admin
  • Grab the default password
    • Password Location:/var/lib/jenkins/secrets/initialAdminPassword

to get the password to enter the below command in the home directory

cat /var/lib/jenkins/secrets/initialAdminPassword
  • Skip Plugin Installation; We can do it later
  • Change admin password
    • Admin > Configure > Password
  • Configure java path
    • Manage Jenkins > Global Tool Configuration > JDK.
  • Create another admin user id.
Jenkins is ready

Also Read:

  • How to Integrate Notepad++ with Git bash
  • How To Get Access 500+ AWS Courses For Free
  • Create AWS(Amazon Web Services) account in 30 seconds for FREE
Tags: AWSDevopsGuideJenkins
Previous Post

Do credit card generators really work? Legit or Fake review.

Next Post

OYO is hiring for Support Engineers up to 15 L.P.A

Deep vempati

Deep vempati

Related Stories

Linux Commands basic

Top 50 Linux commands Basic To Advance

by Deep vempati
April 2, 2022
0

Many people feel discouraged when thinking of dealing with Linux, but I'm here to tell you it's not so complicated....

Do credit card generators really work?

Do credit card generators really work? Legit or Fake review.

by Deep vempati
November 19, 2021
0

Are you stuck with some website registration and fear to give exact details like credit card numbers? Does your online...

15 best cryptocurrency to invest in 2021 for long-term

15 best cryptocurrency to invest in 2021 for long-term

by Deep vempati
September 28, 2021
0

Hello, guys Today I'm going to talk about the 15 best cryptocurrency to invest in 2021. Which are best suitable...

Integrate Notepad++ with Git bash

How to Integrate Notepad++ with Git bash

by Deep vempati
September 7, 2021
1

Have you been fed up with the default VI editors in GIT BASH, then this guide is for you, How...

Next Post

The Betting Odds Rating System: Using soccer forecasts to forecast soccer

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

nineteen − 4 =

Recommended

Faug release Date

FAU-G release date: India’s most waited battle royal game is all set to release

January 12, 2021

5 best apps that will teach you something every day

April 25, 2020

Popular Story

  • how to send bulk messages on whatsapp

    How To Send Bulk Messages On Whatsapp Using Python Code

    458 shares
    Share 183 Tweet 115
  • HOW TO DO HACKING PRANK ON YOUR FRIENDS WITH FAKE SMS BOMBER

    127 shares
    Share 51 Tweet 32
  • Send Valentine’s Day Greeting by writing Python code

    123 shares
    Share 47 Tweet 29
  • How to download Netflix originals from telegram for free

    103 shares
    Share 41 Tweet 26
  • How To Install Jenkins In Ec2 Instance

    70 shares
    Share 28 Tweet 18
  • Privacy Policy
  • Contact
  • Disclaimer
  • Terms and Conditions

© 2022 ALL RIGHTS RECEIVED - Weirdtechie

No Result
View All Result
  • Home
  • BioLy
  • Video Downloader
  • Apps & Games
  • Contact
  • About

© 2022 ALL RIGHTS RECEIVED - Weirdtechie