This post is about installing Apache Tomcat7 on Ubuntu 12.04. Before this installation make sure java is installed in your machine. You can refer this post if you haven't done that already.
- Download Tomcat 7 tar.gz binary distribution from here.
-
Unpack it using following command.
tar xvzf apache-tomcat-7.0.29.tar.gz
-
Move it to a more appropriate location using following command.
sudo mv apache-tomcat-7.0.29/ /usr/share/tomcat7
-
Open up /usr/share/tomcat7/bin/catalina.sh file using following command
gedit /usr/share/tomcat7/bin/catalina.sh
-
Add following two lines in there after the first line.
JAVA_HOME="/usr/lib/jvm/jdk-6u32" JRE_HOME="/usr/lib/jvm/jdk-6u32/jre"
-
Open up /usr/share/tomcat7/conf/tomcat-users.xml and uncomment user and role entries there. Then add a manager-gui role and a user by adding following lines there.
<role rolename="manager-gui"/> <user username="pavithra" password="tomcat" roles="manager-gui"/>
-
Start the Tomcat server using following command.
sudo /usr/share/tomcat7/bin/catalina.sh run
-
Verify Tomcat installation using the following URL.
http://127.0.0.1:8080/
-
To login as the manager, use the following URL, provide the relevant username and password.
http://127.0.0.1:8080/manager/html
Thanks a lot... This is a really good tutorial....
ReplyDeleteBut how can I start this service on every start up ?
ReplyDeleteGood one for getting starter!
ReplyDeletethanks, very useful introduction
ReplyDeleteThank you so much
ReplyDeleteThank you, worked like a charm......
ReplyDeleteWONDERFUL IT WORKS AFTER SO MANY UNSUCCESSFUL INSTALLATION IT REALLY WORKS...
ReplyDeletei am getting following error after step 7
ReplyDeleteexec 1:/usr/lib/jvm/jdK1.7.0_40/jre/bin/java: not found
Could anyone help me?
Thank you pavitra.
ReplyDelete