LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   'Best practices' when installing downloads/programs? (https://www.linuxquestions.org/questions/linux-general-1/best-practices-when-installing-downloads-programs-267811/)

wmcase 12-18-2004 03:41 PM

'Best practices' when installing downloads/programs?
 
Hi;

This not really a HOWTO question. I have been downloading programs and installing them in Linux for over 2 years now but ...

I have been rather cavalier up to now as to where I stick the downloads and archives . I usually 'make' into a /usr/share/directory. RPM's take care of themselves.

Does anyone have suggestions for:

1) Where and how to create a specific downloads directory with specific program sub-directories i.e. is /downloads with chown root, chgrp user1 (me), chmod 775 a good idea? Does that give me enough latitude or is it too permissive. I have a two computer home network used mainly by me.

2) When I unzip program.tar.gz or program.tar.bzip2 should I create the tar archive in /downloads/program/archive or should I archive elsewhere? Don't some people use /tmp for archives and is this a good pracitice?

3) After building from an archive to a /usr/share/program directory should I remove the archive directory because its taking up space and is un-neat (space is not a problem at the moment). Or, is it somehow safer to leave the archive in place?

After 1 to 2 years on a steep Linux learning curve, its time for me to pause and clean up -- with regards to this issue and several others. I would like to do it properly. Thanks

Regards Bill

slakmagik 12-18-2004 05:14 PM

Re: 'Best practices' when installing downloads/programs?
 
Quote:

Originally posted by wmcase
1) Where and how to create a specific downloads directory with specific program sub-directories i.e. is /downloads with chown root, chgrp user1 (me), chmod 775 a good idea? Does that give me enough latitude or is it too permissive. I have a two computer home network used mainly by me.
I have ~/src, chmod 700, with categories - editors, net, blah - and apps - vim, nedit, blah - inside those. Tarballs inside those.

Quote:

2) When I unzip program.tar.gz or program.tar.bzip2 should I create the tar archive in /downloads/program/archive or should I archive elsewhere? Don't some people use /tmp for archives and is this a good pracitice?
I create the untarred directory right next to the tarball. Name the last one foo.bak. If everything goes well, I delete the old and keep the new.

Quote:

3) After building from an archive to a /usr/share/program directory should I remove the archive directory because its taking up space and is un-neat (space is not a problem at the moment). Or, is it somehow safer to leave the archive in place?
I keep the new because I might want to check out the source, look over the config logs, change a flag and recompile, whatever. I install everything possible to /usr/local or, failing that, ~/bin or, failing that, then to /usr. Unless it's a lib that I think is easier pathwise to just stick in a default place. All the downloading and compiling is as regular user - I just su or switch to a virtual console as root to install.

That's just me. I'm sure there's a zillion ways and it probably depends on the setup, users, etc. I'm the only user of my machines (I hope :D) so I do things however I like.

slightcrazed 12-18-2004 06:30 PM

Personally, I put all of my source trees in /usr/src/, which is owned by root but has group read/write/execute permission for a group that my user(s) belong to. I usually junk the tarballs after compile, and I only keep the trees if it is something that I may need to recompile in the future.

You may want to try out checkinstall. It is a wonderful little piece of programming that allows you to skip the 'make install' phase and instead creates a package from your source tree (It does support RPMs as well as slackware .tgz and debian packages as well I believe). I use to keep most of my source trees around so that I could 'make uninstall' if I needed to, with checkinstall I can just delete the package as I would any other.

slight


All times are GMT -5. The time now is 11:51 AM.