go to  ForumEasy.com   
JavaPro  
 
 
   Home  |  MyForum  |  FAQ  |  Archive    You are not logged in. [Login] or [Register]  
Forum Home » Java Deploying » How to deploy Jenkins service with Tomcat
Email To Friend  |   Set Alert To This Topic Rewarding Points Availabe: 0 (What's this) New Topic  |   Post Reply
Author Topic: How to deploy Jenkins service with Tomcat
Linux
member
offline   
 
posts: 120
joined: 01/24/2011
from: San Jose, CA
  posted on: 10/15/2017 11:53:00 PM    Edit  |   Quote  |   Report 
How to deploy Jenkins service with Tomcat
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

 Profile | Reply Points Earned: 0
Linux
member
offline   
 
posts: 120
joined: 01/24/2011
from: San Jose, CA
  posted on: 10/15/2017 11:55:05 PM    Edit  |   Quote  |   Report 
Step 2: Upload to AWS EC2 instance

-- 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

*************************************************************
 Profile | Reply Points Earned: 0
Linux
member
offline   
 
posts: 120
joined: 01/24/2011
from: San Jose, CA
  posted on: 10/15/2017 11:56:43 PM    Edit  |   Quote  |   Report 
Step 3: Configure Jenkins
Page #1:

http://10.11.12.13:8080/jenkins --> http://10.11.12.13:8080/jenkins/login?from=%2Fjenkins%2F

Unlock Jenkins
To ensure Jenkins is securely set up by the administrator, a password has been written to the log (not sure where to find it?) and this file on the server:

/root/.jenkins/secrets/initialAdminPassword

Please copy the password from either location and paste it below.

Administrator password


Page #2:

Customize Jenkins
Plugins extend Jenkins with additional features to support many different needs.

Select Suggested Plugins:

(If your JVM has limited RAM resource (e.g. ~512MB), you may experience the OutOfMemory error at the plugins loading stage)
 Profile | Reply Points Earned: 0

 
Powered by ForumEasy © 2003-2005, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.