How do I install Apache Tomcat 7?
Solution 1
11.10 or later
sudo apt-get install tomcat7
or the really easy way:
Solution 2
Tomcat 7 is available for Precise and Oneiric https://launchpad.net/ubuntu/+source/tomcat7
Backports for Natty are here:
deb http://ppa.launchpad.net/tomcat7-ubuntu/backports/ubuntu natty main deb-src http://ppa.launchpad.net/tomcat7-ubuntu/backports/ubuntu natty main
Related videos on Youtube
Anupesh
Updated on September 18, 2022Comments
-
Anupesh almost 2 years
Troubleshooting with apache Tomcat 7 steps should be followed ....
after downloading apache-Tomcat 7 // open terminal go to that downloading file folder in which tar.gz file is still.
Untar the tar file
tar -xzvf filename.tar.gz
move a extracted directory of apache-Tomcat7 in current path
sudo mv Directory_Name(Extracted eg.apache-Tomcat 7.0.32) /usr/local/Tomcat7
to set environment variable for Tomcat7
sudo nano /usr/local/Tomcat7/bin/setenv.sh
then Nano editor will open ..
JAVA_HOME =/usr/lib/jvm/java-6-sun export CATALINA_OPTS="$CATALINA_OPTS -Xms128m -Xmx1024m -XX:MaxPermSize=256m
after hit ctrl+X to save file
- to set the role and username and password.
sudo nano /usr/local/Tomcat7/conf/./tomcat-users.xml
<role rolename="manager-gui" /> <role rolename="manager-script" /> <role rolename="manager-jmx" /> <role rolename="manager-status" /> <user username="admin" password="admin" roles="manager-gui,manager-script,manager-jmx,manager-status"/>
Ctrl+X to save file
- If Port no confliction comes in a way then open file to change the port no.
sudo nano /usr/local/Tomcat7/conf/./server.xml
then change the connector port as you want....
-
Jorge Castro about 13 yearsWelcome to askubuntu, I've fixed the formatting for you, but it looks to me like you should have most of your question posted as an answer to your initial question.
-
Paul Gregoire over 12 yearsThis doesn't work for me on Natty
-
tumbleweed over 12 years@Mondain: Yup, tomcat7 first landed in oneiric.
-
Paul Gregoire over 12 yearsIts certainly confusing for newbies. I just used the tar.gz from apache and it works as expected.
-
Varuna about 12 yearsI asked the question because I install Tomcat as described here <coderanch.com/t/551474/Linux-UNIX/install-tomcat-Ubuntu-when-it> and I can't figure out what is the reason for different descriptions
-
Eliah Kagan about 12 yearsWhilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.