开发者

Why does PEAR get installed to my user directory?

开发者 https://www.devze.com 2022-12-23 18:46 出处:网络
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

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


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

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


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.

0

精彩评论

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

关注公众号