views:

72

answers:

2

I am new to Linux and I am attempting to install the PHP PEAR library on a virtual server which is running Ubuntu. I am following a tutorial that covers installing PEAR but have run up against an area where I am confused. When running the PEAR installation program I am prompted as to what I want the INSTALL_PREFIX to be. Evidently the INSTALL_PREFIX, among other things, determines where PEAR will be installed. The tutorial suggest the value of INSTALL_PREFIX be the following path ...

"/home/MY_USER_NAME/pear"  

where MY_USER_NAME = my user account

Having come from a Windows world, applications are installed on the system where everyone can use them. If I install PEAR underneath my user directory will other developers on the system be able to make use of PEAR in their PHP scripts? I want to make PEAR available to all users and not just myself.

Could someone explain to me the difference between installing for all users and installing just for myself? Does the install location matter? Should I be installing PEAR in a different location?

Thanks for any suggestions.

P.S. The tutorial I am following is located at the following URL ...

http://articles.sitepoint.com/article/getting-started-with-pear/2

A: 

There is no law against giving others access to your home directory but in practice it is never done. If you wanted to do that you would have to set the correct directory permissions and the other users would need to put your stuff on their PATH. But don't, it's bad if only because others can see all your stuff, accidentally (or maliciously) delete things, etc.

You should read a few things on file system standards and file system hierarchy and figure out what is appropriate for you system. Usually it will be something like /opt or /usr/local which will be accessible to all users. Usually you will need to have root permissions to install in global locations.

Duck
Thanks for the info Duck. I will read those links you gave. If you were installing PEAR where would you install it to? Would you use "/usr/local/PEAR"?
webworm
@webworm - Unfortunately I know nothing about PEAR other than what I read in the last 2 minutes from your link so I am not the best person to ask. I am going to edit your tags so the question is visible in the php section and you should get a better idea from the people there. Also, really, this should probably be on Superuser or Serverfault.
Duck
A: 

Amend your INSTALL_PREFIX... typically PEAR gets installed to /usr/share/php/

Have you read through the install section on the PEAR site?

kguest