Launch a REDHAT Linux instance in AWS andlog into it
----------------------------------------------------------------------
JAVA8 is the prerequisite to install jenkins server
----------------------------------------------------------------
INSTALLING JAVA-8 IN AWS EC2 INSTANCE:
1. cd /opt/
2. wget --no-cookies --no-check-certificate --header "Cookie:
gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie"
"http://download.oracle.com/otn-pub/java/jdk/8u131-
b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz"
3. tar xzf jdk-8u131-linux-x64.tar.gz
4. ls
5. cd jdk1.8.0_131
6. ls
7. alternatives --install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2
8. alternatives --config java
9. alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_131/bin/jar 2
10. alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_131/bin/javac 2
11. alternatives --set jar /opt/jdk1.8.0_131/bin/jar
12. alternatives --set javac /opt/jdk1.8.0_131/bin/javac
13. export JAVA_HOME=/opt/jdk1.8.0_131
14. export JRE_HOME=/opt/jdk1.8.0_131/jre
15. export PATH=$PATH:/opt/jdk1.8.0_131/bin:/opt/jdk1.8.0_131/jre/bin
16. java -version
--------------------------------------------------------------------------------------------------------------------------
INSTALLING JENKINS IN AWS REDHAT LINUX EC2 INSTANCE:
After installing JAVA8 , then from here copy these three commands and paste it in putty
1. sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
2. sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
3. yum install jenkins
service jenkins status
service jenkins start---------------- (It will show like this)
Starting jenkins (via systemctl): [ OK ]
--------------------------------------------------------------------------------------------------------------------------
After starting jenkins go to aws ec2 dashboard and copy instance ip adress and paste it in the browser
immediately jenkins server will ask adminstrator password
then we have to copy /var/lib/jenkins/secrets/initialAdminPassword
and paste it in putty command :- cat /var/lib/jenkins/secrets/initialAdminPassword
Then a password will generate and copy and paste it in jenkins server
----------------------------------------------------------------------
JAVA8 is the prerequisite to install jenkins server
----------------------------------------------------------------
INSTALLING JAVA-8 IN AWS EC2 INSTANCE:
1. cd /opt/
2. wget --no-cookies --no-check-certificate --header "Cookie:
gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie"
"http://download.oracle.com/otn-pub/java/jdk/8u131-
b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz"
3. tar xzf jdk-8u131-linux-x64.tar.gz
4. ls
5. cd jdk1.8.0_131
6. ls
7. alternatives --install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2
8. alternatives --config java
9. alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_131/bin/jar 2
10. alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_131/bin/javac 2
11. alternatives --set jar /opt/jdk1.8.0_131/bin/jar
12. alternatives --set javac /opt/jdk1.8.0_131/bin/javac
13. export JAVA_HOME=/opt/jdk1.8.0_131
14. export JRE_HOME=/opt/jdk1.8.0_131/jre
15. export PATH=$PATH:/opt/jdk1.8.0_131/bin:/opt/jdk1.8.0_131/jre/bin
16. java -version
--------------------------------------------------------------------------------------------------------------------------
INSTALLING JENKINS IN AWS REDHAT LINUX EC2 INSTANCE:
After installing JAVA8 , then from here copy these three commands and paste it in putty
1. sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
2. sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
3. yum install jenkins
service jenkins status
service jenkins start---------------- (It will show like this)
Starting jenkins (via systemctl): [ OK ]
--------------------------------------------------------------------------------------------------------------------------
After starting jenkins go to aws ec2 dashboard and copy instance ip adress and paste it in the browser
immediately jenkins server will ask adminstrator password
then we have to copy /var/lib/jenkins/secrets/initialAdminPassword
and paste it in putty command :- cat /var/lib/jenkins/secrets/initialAdminPassword
Then a password will generate and copy and paste it in jenkins server
No comments:
Post a Comment