25

i tried to install

   1.yum install -zxvf apache-tomcat-6.0.47.tar.gz then 
   2.  export TOMCAT_HOME=/home/mpatil/softwares/apache-tomcat-6.0.37
   3. [root@localhost mpatil]# echo $TOMCAT_HOME 
      /home/mpatil/softwares/apache-tomcat-7.0.47

while starting tomcat by using this command

   4.[root@localhost mpatil]# /startup.sh 
bash: /startup.sh: No such file or directory 

i don't know why it showing like this.

my file in

      5.[root@localhost mpatil]#  find /home -type f -name   apache-tomcat-6.0.37.tar.gz
/home/mpatil/Downloads/apache-tomcat-6.0.37.tar.gz

what i tried before this is is correct or not? --please tell me my question is how to start a tomcat server in linux.Please tell me..

8 Answers8

48

The command you have typed is /startup.sh, if you have to start a shell script you have to fire the command as shown below:

$ cd /home/mpatil/softwares/apache-tomcat-7.0.47/bin
$ sh startup.sh 
or 
$ ./startup.sh 

Please try that, you also have to go to your tomcat's bin-folder (by using the cd-command) to execute this shell script. In your case this is /home/mpatil/softwares/apache-tomcat-7.0.47/bin.

Florian Neumann
  • 5,587
  • 1
  • 39
  • 48
linux_fanatic
  • 4,767
  • 3
  • 19
  • 20
  • 1
    ya i tried to start and done successfully.now how to add JAVA_HOME and CATALINA_HOME ? –  Nov 08 '13 at 07:14
  • http://stackoverflow.com/questions/6172258/how-to-set-java-home-or-catalina-home-if-i-have-more-than-1-version-used-for-pro you have to set the path and export for JAVA_HOME and CATALAINA_HOME check the link – linux_fanatic Nov 08 '13 at 07:20
  • MY JDK IN JAVA_HOME=/home/mpatil/softwares/jdk-7u21-linux-x64.tar.gz i tried but nothing should comming –  Nov 08 '13 at 07:37
  • [root@localhost mpatil]# JAVA_HOME=/home/mpatil/softwares/jdk-7u21-linux-x64.tar.gz [root@localhost mpatil]# –  Nov 08 '13 at 07:37
  • Try this "A Complete Guide To Tomcat Start-Up" tutorial: http://www.mulesoft.com/tcat/tomcat-start – pm_labs Mar 31 '14 at 05:21
7

Use ./catalina.sh start to start Tomcat. Do ./catalina.sh to get the usage.

I am using apache-tomcat-6.0.36.

Raktim Biswas
  • 4,011
  • 5
  • 27
  • 32
Jason
  • 71
  • 1
  • 1
5

if you are a sudo user i mean if you got sudo access:

      sudo sh startup.sh 

otherwise: sh startup.sh

But things is that you have to be on the bin directory of your server like

cd /home/nanofaroque/servers/apache-tomcat-7.0.47/bin

Omar Faroque Anik
  • 2,531
  • 1
  • 29
  • 42
4

I know this is old question, but this command helped me!

Go to your Tomcat Directory
Just type this command in your terminal:

./catalina.sh start
vinas
  • 41
  • 7
3
cd apache-tomcat-6.0.43 ====: Go to Tomcat Directory 
sh bin/startup.sh   =====: Start the tomcat on Linux 
sh bin/shutdown.sh   ======:Shut Down the tomcat on Linux
tail -f logs/catelina.out ====: Check the logs  
Anand Dwivedi
  • 1,452
  • 13
  • 23
1

Go to your Tomcat Directory with : cd/home/user/apache-tomcat6.0

  • sh bin/startup.sh.>> tail -f logs/catelina.out.>>
Raktim Biswas
  • 4,011
  • 5
  • 27
  • 32
0

Go to the appropriate subdirectory of the EDQP Tomcat installation directory. The default directories are:

On Linux: /opt/server/tomcat/bin

On Windows: c:\server\tomcat\bin

Run the startup command:

On Linux: ./startup.sh

On Windows: % startup.bat

Run the shutdown command:

On Linux: ./shutdown.sh

On Windows: % shutdown.bat

ngg
  • 1,493
  • 19
  • 14
0

To run Apache Tomcat server in Linux following ways can be used. Let me share the difference as well since I see some got confusions with the multiple ways Apache Tomcat Server can be started.

The catalina.sh is the main control script for Tomcat. Following are the multiple ways of running tomcat:

./catalina.sh run

Passing "run" argument for catalina.sh --> starts the Tomcat in the foreground and displays the running logs in the same console. when the console terminal is closed it will terminate the tomcat.

./catalina.sh start

Passing "start" argument for catalina.sh --> starts the Tomcat in the background. Since in background no issues closing down the terminal. The logs need to be viewed as below: tail -f $CATALINA_HOME/logs/catalina.out

./startup.sh 

The last way is firing the startup.sh to start your Tomcat server. If you Vi the script you can see it calls catalina.sh script passing start as the argument. This will be running in background as well.

Du-Lacoste
  • 11,530
  • 2
  • 71
  • 51