Compiling/Installing without root permissions ...

I attended our organization’s LUG (Linux User Group) meeting last night. These meetings are always educational to me, and last night was no exception.

A couple of our guru’s (who probably have forgotten more about Linux than I will ever learn) noted it can be very useful at times to do a slight deviation from the nominal compiling technique every one reads about. Of course everyone is familiar with:


./configure
make
su
make install

Note here that one switches to root permissions BEFORE ‘make install’ and then the ‘make install’ is allowed to run, putting the application/libraries in places that typically only root has access. A certain amount of TRUST is needed here for one to do this. Now I normally have the trust when I custom compile, but still, it is a good point.

What they noted was instead, if one is not certain of the source of the tarball to which one is installing, or if one just wants to be cautious and TEST an application first before giving the application root permissions, is one can often instead do as a regular user:


./configure --prefix=/home/username/somedirectory 
make
make install

The above is all done as a regular user. NO root permissions are needed.

Now this means the user called ‘username’ can then run that application (which is probably now located in ‘/home/username/somedirectory/bin’ and test it, without worrying about that application having complete access to one’s PC. That prefix can be better tuned to put the application to the exact location one wants.

A neat thing one can do is then run multiple instances (of different versions) of an application at the same time, to compare features/functionality.

For example in the lug we did a custom compilation of the editor leafpad version 0.8.18 (instead of the stock rpm 0.8.17) and then we ran both versions of leafpad at the same time.

I think this is a good ‘technique’ that every average Linux user should have in their ‘back pocket’ for any suitable occasion.

./configure
make
su
make install

I have written about these commands in my guide about installing a program when it is in code form.
Here the guide who I have written Πως κάνω εγκατάσταση προγραμμάτων στο Opensuse](http://forums.opensuse.org/greek/i-i-i-i/i-i-i-iui-i-i-i-i-i-i-i-i-i-i-i-i-isi-i-i-ioei-i-i-i-i/i-iui-i-i-i-i-i-i-i-documentation/453298-i-i-i-i-i-i-i-iui-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-i-opensuse.html)

I have also written other guides about opensuse’s fuction Τεκμηρίωση(Documentation)](http://forums.opensuse.org/greek/i-i-i-i/i-i-i-iui-i-i-i-i-i-i-i-i-i-i-i-i-isi-i-i-ioei-i-i-i-i/i-iui-i-i-i-i-i-i-i-documentation/)

And guides about programming languages “Learn C++, PYTHON, FORTRAN etc”
Προγραμματισμός](http://forums.opensuse.org/greek/i-i-i-i-iui-i-i-i-i-i-i-i-i-i-i-i-i-i-i/i-i-i-i-i-i-i-i-i-i-i-i-i-ioei/)

Always friendly!!!;):slight_smile:

Because I am member of hellug(Hellenic linux user group). We have already discussed about that in our meeting.
Translate them because they were written in Hellas language(Greek).

On 02/25/2011 02:36 PM, oldcpu wrote:
> What they noted was instead, if one is not certain of the source of the
> tarball to which one is installing, or if one just wants to be cautious
> and TEST an application first before giving the application root
> permissions, is one can often instead do as a regular user:

in fact, the true paranoid will do the configure …to… make
install as that “test” user (/home/[test]) who has access to neither
root files nor my files (/home/[me])…

can’t you see how nice that would be??

ps: if folks were not after me, i wouldn’t be paranoid!! :wink:


DenverD
CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

On 2011-02-25 15:26, DenverD wrote:
> On 02/25/2011 02:36 PM, oldcpu wrote:
>> What they noted was instead, if one is not certain of the source of the
>> tarball to which one is installing, or if one just wants to be cautious
>> and TEST an application first before giving the application root
>> permissions, is one can often instead do as a regular user:

Some apps I do not even “install”, I run them in place. Some work that way.

The problem is when apps need a special path. Some are libs. How to “depmod”?

On occasion, you have to install a package before the “configure” of the
next package works…

> in fact, the true paranoid will do the configure …to… make
> install as that “test” user (/home/[test]) who has access to neither
> root files nor my files (/home/[me])…

I have done that, too.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)