Monday, September 14, 2015

how to install apache tomcat on ubuntu 14.04




Step 1 » Install JDK 7 before installing tomcat.


Step 2 » Download latest tomcat version ( Choose latest version from here –Download Apache Tomcat ).
cd /usr/local


Step 3 » Extract the package
sudo tar –xvf apache-tomcat-7.054.tar.gz


Step 4 » Configure  /etc/environment

set the java and tomcat home directories
PATH=":/usr/local/games:/usr/lib/jvm/java-7-openjdk-amd64/bin: /usr/local/apache-tomcat-7.0.54/bin”
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/bin"
CATALINA_HOME="/usr/local/apache-tomcat-7.0.54/bin"

sorce the environment file by using
source /etc/environment command.

Step 5 »

Choose username and password to manage tomcat and add to the file /usr/local/apache-tomcat-7.0.54/conf/tomcat-users.xml like the below. The below code must be within < tomcat-users > …. < /tomcat-users > tags.

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="passwd" roles="manager-gui,admin-gui"/>

Step 6 »

Tomcat and Java should now be installed and configured on your server. To activate Tomcat, run the following script:

start the server

sudo $CATALINA_HOME/startup.sh

You should get a result similar to:



Step 7 »

Now open http://serve-IP:8080 in your browser, you will get





Step 8 »
stop the server

sudo $CATALINA_HOME/shutdown.sh





No comments:

Post a Comment