Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why I can not start my tomcat from command line?

I downloaded tomcat version 7.0.16 binary distributions core tar.gz from tomcat's official website to my ubuntu machine, then extracted the downloaded file.

Then, I used terminal command to specify the path to ~/apache-tomcat-7.0.16/bin$ , then I entered startup command, but I have got 'startup: command not found' message, but when I used linux command ls, there were startup.bat and startup.sh under bin/.

I also tried to enter startup.bat and startup.sh, the same message returned. Why I can not start my tomcat v7 from ubuntu terminal window??

like image 750
Leem Avatar asked Jun 22 '11 08:06

Leem


3 Answers

I did it with command:

chmod +x catalina.sh
sudo ./startup.sh
like image 173
Milorad Simic Avatar answered Oct 13 '22 00:10

Milorad Simic


you should like this:

sudo chmod +x /Users/yw/Tomcat/bin/*.sh

like image 36
user2497752 Avatar answered Oct 13 '22 02:10

user2497752


If you're trying to run startup.sh from the directory that contains it, you'll need to prefix the name with ./ - the current directory is not on the PATH by default. Also, you'll need the .sh extension.

So either:

~/apache-tomcat-7/bin$ ./startup.sh

Or:

~/apache-tomcat-7$ bin/startup.sh
like image 41
Rob Harrop Avatar answered Oct 13 '22 02:10

Rob Harrop