Why can't I start my tomcat from the command line?

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

Then I used the terminal command to indicate the path to ~/apache-tomcat-7.0.16/bin $, then I entered the startup command, but I got the message startup: command not found ", but when I use the linux ls , file bin /.

were startup.bat and startup.sh

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

+6
source share
4 answers

If you are trying to run startup.sh from the directory containing it, you will need to prefix the name with ./ - the current directory is not in PATH by default. In addition, you will need the .sh extension.

So either:

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

Or:

 ~/apache-tomcat-7$ bin/startup.sh 
+23
source

Actually the problem is that your startup.sh does not have permission to execute, so you cannot start it. First check for correctness, enter ./startup.sh and see what it says. If he says “you don’t have permission”, give him permission to execute with this command chmod 777 startup.sh . Then try to run it.

+5
source

you should like the following:

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

+4
source

I did this with the command:

 chmod +x catalina.sh sudo ./startup.sh 
0
source

Source: https://habr.com/ru/post/891087/


All Articles