开发者

Why I can not start my tomcat from command line?

开发者 https://www.devze.com 2023-03-14 09:47 出处:网络
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.

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 returne开发者_开发知识库d. Why I can not start my tomcat v7 from ubuntu terminal window??


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


you should like this:

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


Actually the problem is your startup.sh does not have the execute permission that is why you are unable to start it. First check that properly, type ./startup.sh there and observe what it says. If it is saying that "you don't have the permission" then give it execute permission by this command chmod 777 startup.sh. Then try to to start it.


I did it with command:

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

精彩评论

暂无评论...
验证码 换一张
取 消