|
Upgrade Tomcat to Version 7u68 |
|
Subject: Upgrade Tomcat to Version 7u68
Author: AwsEC2
In response to: Side notes for .war deployment.
Posted on: 04/20/2016 11:39:47 PM
Download and unpack Tomcat 7
# mkdir /env
# mkdir /env/tomcat
# cd /env/tomcat
# curl http://apache.go-parts.com/tomcat/tomcat-7/v7.0.68/bin/apache-tomcat-7.0.68.tar.gz >
apache-tomcat-7.0.68.tar.gz
# tar zxvf apache-tomcat-7.0.68.tar.gz
Configure Tomcat 7Modify the file "/etc/rc.d/init.d/tomcat" accordingly:
#!/bin/sh
# Tomcat init script for Linux.
#
# chkconfig: 2345 96 14
# description: The Apache Tomcat servlet/JSP container.
JAVA_HOME=/opt/jdk1.7.0_79
CATALINA_HOME=/env/tomcat/apache-tomcat-7.0.68
export JAVA_HOME CATALINA_HOME
exec $CATALINA_HOME/bin/catalina.sh $*
Build Local .war file Step 1. Use Eclipse Export tool to generate your project .war file; Step 2. Use 7-z archive tool to remove your data: conf,data,install (this is a update) Step 3. Upload by WinScp your modified .war unto /env/tomcat/apache-tomcat-7.0.68/webapps/
Migrate customer's data
Step 1. Shutdow your old Tomcat: ./apache-tomcat-x.x.xx/bin/shutdown.sh Step 2. Start your new Tomcat: ./apache-tomcat-7.0.68/bin/startup.sh to deploy your .war contents Step 3. Shutdown ./apache-tomcat-7.0.68/bin/shutdown.sh Step 4. Copy the removed parts: # cp -rf apache-tomcat-x.x.xx/webapps/myContext/data apache-tomcat-7.0.68/webapps/myContext/ # cp -rf apache-tomcat-x.x.xx/webapps/myContext/conf apache-tomcat-7.0.68/webapps/myContext/ Step 5. Modify apache-tomcat-7.0.68/webapps/myContext/conf by adding additional settings Step 6. Start your new Tomcat: ./apache-tomcat-7.0.68/bin/startup.sh
>
> On 08/29/2012 06:53:16 PM AwsEC2 wrote:
1) Upload .war file to folder you have the write (-w) permission as ec2-user.
2) As root user, move (sudo mv) the .war file to webapps folder (owner=root; drwxr-xr-x).
Note: the owner of the file remains unchanged after move.
3) AWS has no outbound security rules. That means your application running within EC2 can use any outgoing port, like 587 for SMTP TLS mail service. If the mail failed, it was not because the port 587 got blocked. Most likely, as it did happen for Gmail, the SMTP server rejected the request.
References:
|
|
|
|