Skip to content
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
#!/bin/bash
# Author: Prof Legah --> banji edition
# date: 25/08/2020
# Installing Jenkins on RHEL 7/8, CentOS 7/8 or Amazon Linux OS
# You can execute this script as user-data when launching your EC2 VM.
#!/bin/bash
# Author: Prof Legah
# date: sep/12/2022
# date: 25/08/2020
# Installing Jenkins on RHEL 7/8, CentOS 7/8 or Amazon Linux OS
# You can execute this script as user-data when launching your EC2 VM.
sudo timedatectl set-timezone America/New_York
sudo timedatectl set-timezone Asia/Hong_Kong
sudo hostnamectl set-hostname jenkins
sudo yum install wget -y
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
sudo yum upgrade -y
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key
sudo yum upgrade
# Add required dependencies for the jenkins package
sudo yum install java-11-openjdk -y
sudo yum install java-17-openjdk -y
sudo yum install tree telnet vim git -y
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
cd /etc/yum.repos.d/
sudo curl -O https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo yum install jenkins -y
sudo systemctl daemon-reload
# start jenkins
# Start Jenkins
# You can enable the Jenkins service to start at boot with the command:
sudo systemctl enable jenkins
#You can start the Jenkins service with the command:=
sudo systemctl start jenkins
# You can check the status of the Jenkins service using the command:
sudo systemctl status jenkins
echo "end of jenkins installation"
sudo su - ec2-user
echo "echo of jenkins installation"
sudo systemctl status jenkins



1 change: 1 addition & 0 deletions JENKINS-INSTALLATION/Jenkins-redhat8-installation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# You can execute this script as user-data when launching your EC2 VM.
sudo timedatectl set-timezone America/New_York
sudo hostnamectl set-hostname jenkins
sudo yum install wget -y
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-2023.key
Expand Down
7 changes: 4 additions & 3 deletions nexus-installation/nexus-installation6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ useradd nexus
#4 Give sudo access to nexus user

sudo echo "nexus ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/nexus
sudo su - sonar
sudo su - nexus

cd /opt

Expand All @@ -26,7 +26,8 @@ sudo yum install java-11-openjdk-devel java-1.8.0-openjdk-devel -y
sudo wget http://download.sonatype.com/nexus/3/nexus-3.15.2-01-unix.tar.gz

sudo tar -zxvf nexus-3.15.2-01-unix.tar.gz
mv /opt/nexus-3.15.2-01 /opt/nexus
sudo mv /opt/nexus-3.15.2-01 /opt/nexus
sudo rm -rf nexus-3.15.2-01-unix.tar.gz


#5 Change the owner and group permissions to /opt/nexus and /opt/sonatype-work directories.
Expand Down Expand Up @@ -71,4 +72,4 @@ Unable to access nexus URL?
-------------------------------------
a)make sure port 8081 is opened in security groups in AWS ec2 instance.

Troubleshooting
Troubleshooting