LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing from source (https://www.linuxquestions.org/questions/linux-software-2/installing-from-source-571871/)

serg.kr 07-24-2007 08:39 AM

Installing from source
 
Hello,

I am planning on installing Apache (from source) on my Xubuntu desktop. However, I'm not very sure what is the best place to put it. I am aware that /usr/local/src is the usual directory for programs installed from source. However, root privileges are disabled there. Of course, I could become root and do what I need to do, but it seems that if root privileges are disabled there, they are disabled there for a good reason. So what is the right approach here?

1. Install the software to another location (perhaps somewhere under /home/myname).
2. Become root and install it under /usr/local/src.
3. Become root and allow write permissions to /usr/local/src for all users. Then install it as a regular user.

Since this is a home computer, permissions aren't really a huge deal. However, I'm trying to learn best practice as early as possible.

On another note: when I actually go to install Apache, where should I set the destination directory? (When I run ./configure, I get to specify the --prefix=/output/directory option which tells Apache where it should install itself.) Is the usual place for this /usr/local? Or should I place it in /, the root directory?

Thank you in advance for any help.

MS3FGX 07-24-2007 08:46 AM

Where you put the source code doesn't matter at all. You could keep it under /home, or put it on a USB flash drive if you wanted.

What matters is where the compiled program actually installs to. The installation prefix should be either /usr or /usr/local, depending on how you like to do things. System software like Apache would generally not be installed under a user's home directory. For the most part, on a single user system, everything should be placed under /usr, as there is no reason to cordon off software based on user.

serg.kr 07-24-2007 07:09 PM

OK, thanks for the help. I decided to go along with what I think is the standard: source code in /usr/local/src and the compiled software in /usr/local/programname. After doing some additional searching on the difference between /usr and /usr/local, it seems that /usr/local is more appropriate for programs that I install myself [1][2].


All times are GMT -5. The time now is 02:32 PM.