apache2 location

Bradley Giesbrecht brad at pixilla.com
Thu Feb 26 11:14:42 PST 2009


On Feb 25, 2009, at 11:35 PM, Bill Hernandez wrote:

>
> On Feb 25, 2009, at 12:13 AM, Bradley Giesbrecht wrote:
>
>> So we would add /usr/local/apache/bin:/usr/local/mysql/bin:/usr/ 
>> local/pgsql/bin:/usr/local/php/bin:etc............................
>> to our environment path?
>>
>> And when apache, mysql or pgsql data out grow your disks you would  
>> move all your bin, data and etc to another volume and change your  
>> paths and startup parameters so they could find the new location  
>> for configs?
>>
>> Data often needs to move. Binaries and configs hardly ever.
>>
>> I think Scott sees an inconsistency and an error with the macports  
>> apache2 install. That's hard to deny.
>>
>> Why not just park everything at /. No distribution I know of  
>> including apple will over write /apache2 and /mysql. Ok, now I'm  
>> kidding. Oh, maybe not.
>>
>> ls /opt/local | cat
>> apache2
>> bin
>> etc
>> include
>> lib
>> libexec
>> man
>> sbin
>> share
>> sql-bench
>> var
>>
>> Doesn't apache2 and sql-bench just look odd. Maybe we should give  
>> them a bunch of company.
>>
>> I think of /opt/local/ as the root or macports.
>
> Brad,
>
> Good point...
>
> I don't have huge amounts of data, so I have not run into that  
> problem, but it's a good point nevertheless.
>
> Matter of fact, all your points make great sense. I just like going  
> to /opt/local/apache2 and finding everything related to apache in  
> one spot.
>
> I remember when I did one of my first installs and began trying to  
> track down the logfiles to mysql and pgsql. It took me some time to  
> locate them due to what I considered to be some inconsistencies. Now  
> that I have done this a few times, it doesn't matter where the stuff  
> lives. It is obvious that I was only considering the convenience,  
> and not the practicality.
>
> /opt/local/var/db/mysql5/hostname.local.err
> /opt/local/var/log/postgresql83/postgres.log
>
> Apache on the other hand was very easy to locate.
>
> /opt/local/apache2/logs/access_log
> /opt/local/apache2/logs/error_log
> /opt/local/apache2/logs/mod_rewrite.log
>
> Now that I more or less know where things live, it doesn't matter,  
> but in the beginning it was not easy tracking down  all the logs and  
> conf files. I should have taken a unix course, darn...
>
> Periodically I will do a clean install of the operating system, and  
> all the applications. I take that opportunity to do a clean install  
> of all the ports I need.
>
> I've done this several times now, on multiple computers, so I  
> eventually wrote a shell script that backs up the databases, all the  
> config files, etc. The script install what I need, and initializes  
> the databases, creates all the symlinks, and a bunch of little  
> cleanup stuff. I seem to have worked out all the little kinks,  
> because the last three or four times everything has gone very well.  
> BUT in the beginning it was a pain figuring out where all this stuff  
> lived.
>
> So if you guys think its better to correct the layout to fit in with  
> the rest of the ports, I will be very happy, and make any  
> adjustments to my script.

Thanks for your comments.

Considering your script as an example is one of the reasons a sane and  
logical layout is nice.

tar xvzf opt_local_var.tar.gz /opt/local/var
tar xvzf opt_local_etc.tar.gz /opt/local/etc

//Brad


More information about the macports-users mailing list