The LTS repo is pretty good, but for some reason I prefer the "build from source" method for some programs. One reason is that I get the preferred version (PHP on LTS is on 5.3, whereas I can compile 5.4 from source). Similar is the case for nginx
, node.js
, etc.
Now I would like to know, why all tutorials insist on installing the programs to the "root-owned" folders such as /opt
, /srv
, or /usr/local
. I find it much easier to install it in my home folder such as:
/home/prahlad/programs/PHP-5.4
One advantage is that I don't need to use sudo
to install these programs. Second and a related advantage is security concern. What if (suppose) any of these sources happen to contain malware (though less probable on linux)? Isn't denying them root privilege a good thing to do?
I would like to know one example where it becomes necessary for a program to get installed in a root-owned folder?
PREFIX=$HOME
. – goldilocks Jun 24 '14 at 18:34