Skip to content

Commit

Permalink
updated jenkins installation steps
Browse files Browse the repository at this point in the history
  • Loading branch information
yankils authored Oct 20, 2021
1 parent 3188ca2 commit 9c41215
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions Jenkins/Jenkins_Installation.MD
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,22 @@ Jenkins is a self-contained Java-based program, ready to run out-of-the-box, wit
1. EC2 Instance
- With Internet Access
- Security Group with Port `8080` open for internet
1. Java v1.8.x
1. Java 11 should be installed

## Install Java
1. We will be using open java for our demo, Get the latest version from http://openjdk.java.net/install/
```sh
yum install java-1.8*
#yum -y install java-1.8.0-openjdk-devel
```

1. Confirm Java Version and set the java home
```sh
java -version
find /usr/lib/jvm/java-1.8* | head -n 3
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-<Java version which seen in the above output>
export JAVA_HOME
PATH=$PATH:$JAVA_HOME
# To set it permanently update your .bash_profile
vi ~/.bash_profile
```
_The output should be something like this,_
```sh
[root@~]# java -version
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)
```

## Install Jenkins
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.
1. Get the latest version of jenkins from https://pkg.jenkins.io/redhat-stable/ and install
```sh
yum -y install wget
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum -y install jenkins
amazon-linux-extras install epel
amazon-linux-extras install java-openjdk11

#on RedHat/CentOs
#yum install epel-release # repository that provides 'daemonize'
#yum install java-11-openjdk-devel
#yum install jenkins
```

### Start Jenkins
Expand Down Expand Up @@ -77,4 +58,3 @@ Jenkins is a self-contained Java-based program, ready to run out-of-the-box, wit
1. Save your job
1. Build job
1. Check "console output"

0 comments on commit 9c41215

Please sign in to comment.