Replacing Mac OS Apache with macports Apache
dvergnaud at yahoo.com
Sat Feb 13 16:14:46 PST 2010
I just just installed the PHP library imagick on my Mac Mini running a standard Leopard (10.5.8) system featuring apache 2.2.13 and php 5.2.11. While installing imagick, macports also built new versions of apache (2.2.14) and php (5.3.1) into /opt/local, so I now have two concurrent versions of each of these programs.
I haven't gone any further yet, so the "legacy" web server (/usr/sbin/httpd) is still running, and it still uses the "legacy" php version (/usr/bin/php). I have nothing against updating to the newer versions, however before I do I want to make sure I won't be breaking any dependencies or creating conflicts.
So here's my question: how should I proceed for a clean update? Here are my uncertainties so far:
- how can I make sure that the apache daemon lauched at startup is the proper one? While building apache2 port reported that the new daemon was ready for activation, but most probably it won't disable the former one automatically?
- should I set a new location for the httpd.conf file? I was using /etc/apache2/httpd.conf, the new one is located in /opt/local/apache2/conf/httpd.conf, and I couldn't find the location where this path can be set (at least I didn't see it in apachectl).
- what should I do with the content of the /etc/apache2 directory? Is there anything I should transfer to the new root directory, or anything that should remain there? Somehow I don't feel comfortable having two concurrent installations on the system, especially if the one running is not the one in the standard location.
- the same question goes for php and the possible libraries it carries with itself. Wouldn't it be better to move that from /opt/local to some more standard location? Afaik only my .tcshrc file has been modified to include the new directory in the PATH, that means this new version is not available for processes not running in a terminal or that know the explicit path. What would be the best way to avoid that?
- wouldn't it be just easier to simply include the imagick library into the existing/working environment to avoid all these problems? Are there known dependencies/requirements that would prevent this from running? If not, could anyone tell me exactly what files should be moved and where?
There are probably other questions/tricks I should know about, if anyone could give me replies/advice I'd be really grateful!
Thanks a lot in advance!
More information about the macports-users