LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-08-2005, 03:46 AM   #1
Ricochet
LQ Newbie
 
Registered: Jan 2005
Posts: 19

Rep: Reputation: 0
n00b question re: install from source as root


Well I've searched around a fair bit about the dangers of installing as root, and understand that you shouldn't use root until you have to make install. However, the /usr/src directory has write access disabled for all but root. So how am I supposed to compile the source as a user if I can't even extract the source to the directory? I suppose that I could extract the source as root and then run the commands as a user? I am unclear as to whether these commands will fail though since they can't write files to that directory.

For example, I just installed the latest release of ALSA and it works. However, I went through the whole procedure as root. The ALSA driver works on my user account, so I don't know if it's really necessary to uninstall and start over from a user account. I'm running Slackware 10.0 btw.
 
Old 01-08-2005, 03:53 AM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Two methods come to mind:

1. Have a normal user download the tarball, extract it within his/her own home directory, execute the configure script, and then issue make. Then when you want to install, become root, issue the "make install" and move the source to /usr/src or wherever you want to keep it. There's no rule that says the source must be compiled from the same directory you store it.

2. Change the permissions of /usr/src to something like root:softinst (root=owner, softinst=group). Change the permissions to 77X (where X can be whatever you want, but I would suggest 0). Make a regular user part of the softinst group and re-logon with that user. Then all members of the softinst group can save/extract tarballs inside the /usr/src directory
 
Old 01-08-2005, 04:08 AM   #3
Ricochet
LQ Newbie
 
Registered: Jan 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks for the help. I was uncertain if the source files were supposed to be in the src directory for any reason other than convention. I think I might go with your second suggestion, as it seems a bit more convenient after I get it setup.
 
Old 01-08-2005, 04:18 AM   #4
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
Generally speaking, yes, convention suggests you keep any source trees inside an src directory (/usr/src, /usr/local/src, etc.) In fact, the convention goes so far as to suggest placing source trees for basic system programs in /usr/src (the kernel, core utility packages, and anything else needed to boot the system into a rescue mode), and that everything else should be installed in /usr/local/src. Part of that reasoning is, distributions are not supposed to touch anything in the /usr/local tree. So you could (in theory) reinstall a distro or install an entirely new one and everything in /usr/local would remain intact. It's not quite that simple, but that's the idea.

Also, you don't have to keep source tree around if you don't want to. You can re-tar them, and stick them somewhere (like /usr/local/src/tarballs) or you could just delete them entriely. I only keep the kernel source and anything I've hacked on. I re-tar everything else.
 
Old 01-11-2005, 08:38 PM   #5
Ricochet
LQ Newbie
 
Registered: Jan 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Great, thanks for your help. That clears up a lot of my questions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
n00b question FD_Doc Linux - Newbie 5 11-20-2005 06:09 PM
n00b question: Problems with linux root permissions and ntfs partition wLancer Linux - General 4 12-06-2004 05:32 PM
Really bad n00b question... (How do you install software?) RollTRSForLfe Linux - Newbie 6 08-31-2004 08:30 AM
cannot install opera from source as root timsch75 Linux - Software 2 07-13-2004 12:42 AM
n00b Question sandy_obrien Linux - General 6 08-18-2003 01:19 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration