Subject: Step 2: Upload to AWS EC2 instance
Author: Linux
In response to: How to deploy Jenkins service with Tomcat
Posted on: 10/15/2017 11:55:05 PM
-- WinSCP to your AWS EC2 instance
-- Upload jenkins.war to /tmp --> (Rights: rw-rw-r-- Owner: ec2-user)
-- PuTTY to /env/tomcat/apache-tomcat-7.0.68/bin
-- $ sudo ./shutdown.sh
-- $ sudo cp jenkins.war /env/tomcat/apache-tomcat-7.0.68/webapps/ --> (Rights: rw-r--r-- Owner: root)
-- $ cd /env/tomcat/apache-tomcat-7.0.68/webapps/
-- $ sudo chmod 755 jenkins.war --> (Rights: rwxr-xr-x Owner: root)
-- $ sudo ./startup.sh --> /env/tomcat/apache-tomcat-7.0.68/webapps/jenkins/ to show up
-- $ cat /env/tomcat/apache-tomcat-7.0.68/logs/catalina.out
/java.lang.UnsupportedClassVersionError: jenkins/util/SystemProperties :
Unsupported major.minor version 52.0 (unable to load class jenkins.util.SystemProperties)
(This is because that jenkins.war was build by Java 1.8 but the runtime environment is Java 1.7)
-- $ sudo rm jenkins.war --> /env/tomcat/apache-tomcat-7.0.68/webapps/jenkins/ to disappear
(Repeat the above process with jenkins.war (version 2.32.3 -- 2017-03-01) )
OR simply (by keep Tomcat running):
-- $ sudo cp jenkins.war /env/tomcat/apache-tomcat-7.0.68/webapps/ --> (Rights: rw-r--r-- Owner: root)
-- $ cat /env/tomcat/apache-tomcat-7.0.68/logs/catalina.out
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
01e04f8b60ec4609b05d15acece1029a
This may also be found at: /root/.jenkins/secrets/initialAdminPassword
*************************************************************
>
> On 10/15/2017 11:53:00 PM Linux wrote:
Step 1: Download Jenkins .war file
-- Goto https://jenkins.io/download/
-- Select Generic Java package (.war)
-- You now have jenkins.war in your local machine
References: