4

I am very new to Ubuntu, struggling to find the proper command to install Zend Server on my Ubuntu 9.10 Server.

After downloading the ZF Server and extracting it, I try to run this command:

install_zs.sh 5.3

This is the ls of the extracted ZF archive:

install_zs.sh  README  upgrade_zs_php.sh  zend.deb.repo  zend.rpm.repo

But it says command not found. Any idea?

Arjan
  • 30,974
  • 14
  • 75
  • 112
redcoder
  • 41
  • 1
  • 1
  • 2
  • A good protip here is to press tab to autocomplete file names in the terminal of your current directory. – Jonno_FTW Apr 25 '10 at 16:48
  • 1
    Basically, when you try to run a command, the shell tries to prepend a known path to it, so that you can run a command like `pwd` from any directory without having to specify which one. The shell will run the first program it finds that matches your name. If you are running something NOT on a known path, you have to specify the path. `.` is the current directory, so `./file` manually prepends the current directory to the call to `file` so that shell doesn't have to try and figure out which `file` you want. – Ritwik Bose Apr 25 '10 at 17:08

3 Answers3

8

When executing an executable or script that isn't in your system's "PATH" environment variable, you have to provide the full path to it. "." is an alias for the full path of your current working directory, so ./install_zs.sh 5.3 should work.

I'd like to strongly suggest you give this, or some similar *nix shell documentation a read-through, as maneuvering around the shell blindly is never, ever, ever a good idea.

Jessie
  • 1,992
  • 11
  • 10
4

Normally the current directory is not searched for executables. If the shell script is executable then you can use ./install_zs.sh 5.3 to run it, otherwise use sh install_zs.sh 5.3.

Ignacio Vazquez-Abrams
  • 111,361
  • 10
  • 201
  • 247
2

I found the answer: I had to chmod 755 the file: install_zs.sh, and after I executed without the prefix 'sudo'