Learnings

Spread the love

Install Jenkins on Amazon Linux

Step 1 – Install Java on Amazon Linux

Run below commands to install Java 11 on Amazon Linux as java is mandatory to install jenkins

sudo amazon-linux-extras install java-openjdk11

Step 2 – Check Active Java Version

[root@ip-172-31-60-200 ~]# java -version

openjdk version “11.0.7” 2020-04-14 LTS

OpenJDK Runtime Environment 18.9 (build 11.0.7+10-LTS)

OpenJDK 64-Bit Server VM 18.9 (build 11.0.7+10-LTS, mixed mode, sharing)

If it not showing java Version 11 please point to java 11

Step 3 – Switch Java Version if it not pointing to java11.

alternatives –config java

[root@ip-172-31-60-200 ~]# alternatives –config java

There are 2 programs which provide ‘java’.

Selection    Command


*  1           java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.252.b09-2.amzn2.0.1.x86_64/jre/bin/java)

  • 2           java-11-openjdk.x86_64 (/usr/lib/jvm/java-11-openjdk-11.0.7.10-4.amzn2.0.1.x86_64/bin/java)

Enter to keep the current selection[+], or type selection number: 2

Step 4 Installing Jenkins

1.Download Jenkins repo

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

2.Add Key

rpm –import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

3.Install Jenkins

yum -y install jenkins

  1. Start Jenkins

systemctl start jenkins

  1. Enable Jenkins Service

systemctl enable jenkins

Step 5 Lanch  Jenkins Console

Please collect public ip from AWS console and the default port for Jenkins is 8080

 The first time we need to unlock Jenks.

 After Providing a password you will get below the page to configure plugins and select install Suggested plugins.

You are done with installation now you can create Jobs ….

Please download PDF for screenshots

https://drive.google.com/drive/folders/10Z0YxfaTADRDK5w7O24At74tHnS3jutb?usp=sharing

Enjoy happy learning

bonams

 

Install Docker Engine on Ubuntu with a simple script.

#clone my repository to find script docker_install.sh

git clone https://github.com/bbonam/dockerinstall.git
cd dockerinstall

#Execute below
sh docker_install.sh

#Test Installation
sudo docker run hello-world
sudo docker ps

Thanks
Happy Learning