Author |
Topic: How to deploy Jenkins service with Tomcat |
|
Linux member offline |
|
posts: |
120 |
joined: |
01/24/2011 |
from: |
San Jose, CA |
|
|
|
|
|
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
|
|
|
|
|
|
|
Linux member offline |
|
posts: |
120 |
joined: |
01/24/2011 |
from: |
San Jose, CA |
|
|
|
|
|
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
*************************************************************
|
|
|
|
|
|
|
Linux member offline |
|
posts: |
120 |
joined: |
01/24/2011 |
from: |
San Jose, CA |
|
|
|
|
|
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)
|
|
|
|
|
|
|