Manish Kumar
Manish Kumar

Reputation: 10512

./startup.sh: command not found error

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 ?

Upvotes: 24

Views: 48784

Answers (7)

Fahd Rahali
Fahd Rahali

Reputation: 581

First, you need to change the permission for your file :

  • chmod +x startup.sh

then :

  • sudo ./startup.sh

Upvotes: 0

s.jone
s.jone

Reputation: 21

go to the bin folder.run bellow two commands

chmod 777 startup.sh
chmod 777 catalina.sh

to start tomcat

sudo startup.sh

Upvotes: 0

Krauphy Yeh
Krauphy Yeh

Reputation: 1

Try this:

export PATH=/where_the_path/tomcat/bin:$PATH

it works for me.

Upvotes: 0

alex wong
alex wong

Reputation: 1

chmod 755 ./startup.sh

bash ./startup.sh

Upvotes: 0

amsloa
amsloa

Reputation: 317

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.

Upvotes: 8

Aamir M Meman
Aamir M Meman

Reputation: 1841

Tomcat Running in Mac OS

For Mac-OS , you should take ./catalina.sh file to run Tomcat

Please see the image above in a link

Upvotes: 4

Haifeng Zhang
Haifeng Zhang

Reputation: 31925

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

Upvotes: 46

Related Questions