diff --git a/JENKINS-INSTALLATION/Jenkins-redhat8-install28.sh b/JENKINS-INSTALLATION/Banji edition :Jenkins-redhat8-install28.sh similarity index 51% rename from JENKINS-INSTALLATION/Jenkins-redhat8-install28.sh rename to JENKINS-INSTALLATION/Banji edition :Jenkins-redhat8-install28.sh index 612cc1ea..609e769e 100644 --- a/JENKINS-INSTALLATION/Jenkins-redhat8-install28.sh +++ b/JENKINS-INSTALLATION/Banji edition :Jenkins-redhat8-install28.sh @@ -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 + + + diff --git a/JENKINS-INSTALLATION/Jenkins-redhat8-installation.sh b/JENKINS-INSTALLATION/Jenkins-redhat8-installation.sh index eacb2d9c..fdb690ce 100644 --- a/JENKINS-INSTALLATION/Jenkins-redhat8-installation.sh +++ b/JENKINS-INSTALLATION/Jenkins-redhat8-installation.sh @@ -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 diff --git a/docker installation on unbuntu b/docker installation on unbuntu new file mode 100644 index 00000000..4ca3fe4d --- /dev/null +++ b/docker installation on unbuntu @@ -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 diff --git a/nexus-installation/nexus-installation6.sh b/nexus-installation/nexus-installation6.sh index c7ce95a5..67cd6d5e 100644 --- a/nexus-installation/nexus-installation6.sh +++ b/nexus-installation/nexus-installation6.sh @@ -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 @@ -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. @@ -71,4 +72,4 @@ Unable to access nexus URL? ------------------------------------- a)make sure port 8081 is opened in security groups in AWS ec2 instance. -Troubleshooting \ No newline at end of file +Troubleshooting