First install java 8/1.8
Step 1: Add the repository
At the time of writing, Java 8 is not in the sources list by default, so we have to add the "Webupd8" repo, which contains Java 8.
add-apt-repository ppa:webupd8team/java
Step 2: Update the repository list
apt-get update
Step 3: Install
Run the following command to install Java 8:
apt-get install oracle-java8-installer
During the installation, you will need to agree to the Oracle license. This is as simple as selecting "yes" and hitting "enter".
Step 4: Verify installation
Execute this command to check that the installation was successful:
java -version
... and you will output similar to the following (depending on the current version of Java 8).
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
Install Tomcat 9wget http://www-us.apache.org/dist/tomcat/tomcat-9/v9.0.0.M22/bin/apache-tomcat-9.0.0.M22.tar.gz
tar xvfz apache-tomcat-9.0.0.M22.tar.gz
mv apache-tomcat-9.0.0.M22 /opt/tomcat9
cd /opt/tomcat9
vim conf/tomcat-users.xml
#add below before the </tomcat-users> ends
..
..
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<user username="eudreka" password="urgen123#" roles="manager-gui,manager-script,manager-jmx,manager-status,admin-gui,admin-script"/>
..
</tomcat-users>
./bin/startup.sh
OR
/opt/tomcat9/bin/startup.sh
To verify point your browser to http://202.94.66.59:8080/
You will get 404 Access Denied error if not on same server , to solve this edit context.xml
vim /opt/tomcat9/webapps/manager/META-INF/context.xml
#comment out the lines like below---
<Context antiResourceLocking="false" privileged="true" >
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
<Manager sessionAttributeValueClassNameFilter="java\.lang\.(?:Boolean|Integer|Long|Number|String)|org\.apache\.catalina\.filters\.CsrfPreventionFilter\$LruCache(?:\$1)?|java\.util\.(?:Linked)?HashMap"/>
</Context>
Setup Jenkins [latest stable version]
cd /opt/
wget http://mirrors.jenkins.io/war-stable/latest/jenkins.war
http://202.94.66.59:8080/manager/html
<give username password>
See : jenkins version 2.60
Install plugins for jenksins
Setup the password
http://202.94.66.59:8080/jenkins
cat /root/.jenkins/secrets/initialAdminPassword
f8798282a2ba417bbc78edsdfdsf34c5
...Now paste the password to jenkins login and reset password
Now click on install on suggested plugins..
Fillup the form and create admin user
End



No comments:
Post a Comment