Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

./startup.sh: command not found error

Tags:

I downloaded tomcat9 zip file and extracted all files. now I am running

/bin$ sudo ./startup.sh 

i am getting this error

sudo: ./startup.sh: command not found 

all files are there then why this error ?

like image 851
Manish Kumar Avatar asked Apr 03 '16 16:04

Manish Kumar


People also ask

What is Tomcat startup sh?

sh". For Windows users, these scripts are included as batch files, with the extension "bat". "Catalina" is the script that is actually responsible for starting Tomcat; the "startup" script simply runs "catalina" with the argument "start" ("catalina" also can be used with the "stop" parameter to shut down Tomcat).


2 Answers

you need to make the file executable. run chmod +x startup.sh and then sudo ./startup.sh

like image 179
Haifeng Zhang Avatar answered Oct 04 '22 17:10

Haifeng Zhang


On Mac OS:

If you do not have Apache Tomcat installed go to https://tomcat.apache.org and download the tar.gz from the "Core:" list. Extract the contents:

tar -xf <filename>.tar.gz 

Rename the resulting directory to: CATALINA_HOME and run the following commands:

cd CAATALIN_HOME/bin +x startup.sh ./startup.sh 

When prompted: enter your Mac OS password

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

Tomcat started.

like image 38
amsloa Avatar answered Oct 04 '22 18:10

amsloa