Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull #48

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
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
13 changes: 13 additions & 0 deletions docker installation on unbuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
sudo hostnamectl set-hostname docker
sudo apt update -y
sudo apt install docker.io -y
sudo service docker start
sudo docker info
sudo usermod -aG docker ubuntu
sudo su - ubuntu
sudo docker ps
# when creating a new ubuntu server look at the following below:
#ucp - choose any
#auto assisgn public id - endable (if you see it)
# storage - config to 16 gb unless company says otherwise
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