0

I downloaded Tomcat server from this link : http://tomcat.apache.org/download-70.cgi.

How to install this Tomcat 7. Try to give some good commands for this purpose. I'm new to LINUX(i don't know any commands for how to install a packages in linux).

Please suggest.

Samkit Jain
  • 2,523
  • 16
  • 33

2 Answers2

0

go to your downloaded folder

ex : cd /home/<user>/Downloads

Now to extract the file use the following command :

tar -xvzf apache-tomcat-7.0.47.tar.gz

Now u have extracted that to a folder. To check the folder name

ls | grep apache

Now to run start the server :

now go to that folder

cd /apache-tomcat-7.0.47/bin/
sh startup.sh

To check if the server is running, type this in your browser

localhost:8080

If you see an sample page, you are done installing.

codeMan
  • 5,730
  • 3
  • 27
  • 51
0

To add on to it move the tomcat directory to appropriate place I put it in /opt . From your download folder use the following command.(this step is recommended but not necessary to run tomcat)

sudo mv apache-tomcat-7.0.47 /opt/apache-tomcat7

and if you want to use the tomcat manager GUI set up a user with manager-gui role by editing /opt/apache-tomcat7/conf/tomcat-users.xml and make the following changes. (Open the file in any editor to make these changes.)

<tomcat-users>
<role rolename="manager-gui"/>
<user username="tomcat" password="tomcat" roles="manager-gui"/>
</tomcat-users>
M4ver1k
  • 1,505
  • 1
  • 15
  • 26
  • this is there in tomcat-users.xml –  Nov 12 '13 at 12:22
  • add between opeaning and closing and use that credentials to access Tomcat Manager – M4ver1k Nov 12 '13 at 12:24
  • my problem-- Several ports (8005, 8080, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s). –  Nov 12 '13 at 12:27
  • how to resolve this.. –  Nov 12 '13 at 12:28
  • [Check this thread](http://stackoverflow.com/questions/5064733/several-ports-8005-8080-8009-required-by-tomcat-server-at-localhost-are-alre) – M4ver1k Nov 12 '13 at 12:43