web server: macports vs. mac osx server
Hi All - I'm setting up my research computing environment at a new university and I'm thinking of buying all apple hardware and running Mac OS X rather than linux, as I have done in the past. I have been tinkering with macports for a while on my macbook and it seems to be a great way to manage the open source software I need for life science research. I need to set up a web server with Apache, PHP, Perl, and MySQL and I wonder if I should plunk down the extra money for OSX Server or install and maintain these applications using macports. I have been looking through the macports web site for documentation on installing these packages but I can't find any. Is any needed? It looks like I will need to have the right set of variants to get all these packages installed and talking to one another correctly. I also assume that I need to install the macports version of Apache and that I can't use the one installed with OS X? Is there a tutorial somewhere for setting up a web server with macports? Cheers Mike
Hi Michael; welcome. On Apr 29, 2007, at 03:44, Michael Thon wrote:
Hi All - I'm setting up my research computing environment at a new university and I'm thinking of buying all apple hardware and running Mac OS X rather than linux, as I have done in the past. I have been tinkering with macports for a while on my macbook and it seems to be a great way to manage the open source software I need for life science research.
I need to set up a web server with Apache, PHP, Perl, and MySQL and I wonder if I should plunk down the extra money for OSX Server or install and maintain these applications using macports. I have been looking through the macports web site for documentation on installing these packages but I can't find any. Is any needed? It looks like I will need to have the right set of variants to get all these packages installed and talking to one another correctly. I also assume that I need to install the macports version of Apache and that I can't use the one installed with OS X? Is there a tutorial somewhere for setting up a web server with macports?
I don't use perl much, so I won't mention it below. Mac OS X of course already comes with perl so you don't even need MacPorts to get it. If you want Apache, I recommend you use Apache 2 from MacPorts: sudo port sync sudo port install apache2 sudo port install mysql5 +server sudo port install php5 +apache2 +mysql5 I believe for mod_perl support in Apache 2 you would do sudo port install mod_perl2 If you would like to use Apple's Apache 1 server instead, you can: sudo port install mysql5 +server sudo port install php5 +apache +mysql5 I believe this works with the Apache 1 provided with Mac OS X. No idea whether it works with the Apache 1 provided with Mac OS X Server. Note that I will rename the "apache" variant soon to something that more clearly indicates its purpose, such as "apache_apple". At that time you will need to reinstall php5 with that new variant name. At that time, the variant "apache" will be changed to use the MacPorts version of Apache 1. The mod_perl port exists for the MacPorts version of Apache 1. I can also highly recommend lighttpd, a lightweight web server that can outperform Apache and which has some pretty cool built-in load balancing for server-side scripts like php, and which, quite frankly, I would find much easier to set up if I didn't already know so much about Apache configuration files. If you're not yet well-versed with Apache's configuration, you might find lighttpd considerably easier: sudo port install lighttpd +ssl sudo port install mysql5 +server sudo port install php5 +fastcgi +mysql5 After that, configure the software. Consult the usual documentation. (Consult the Apache web site for information on configuring Apache, consult the MySQL developer zone for info on configuring MySQL, etc.) The advantage of Mac OS X Server is the various Apple services that are provided (NetBoot, AppleShare, blog server, iChat server) and the GUI interfaces they've made for various open-source packages (Open Directory, Apache, Mail, DNS). If you don't need those services, then Mac OS X Server is less attractive. Consider also that not all Mac OS X Server components have GUIs. For example, their version of Apache 2 has none. (Their version of Apache 1 does, however.) Personally, if I were running a mail server, I would want Mac OS X Server because it does include a very nice GUI for administering that which has been refined over many years, and I know nothing about mail server administration otherwise. Same with the DNS server. But for services like mysql and apache which I already know how to administer, any GUI is just going to slow me down and restrict what I can do. That's not entirely true. I do use GUIs to manipulate data in MySQL. I usually use the web-based phpMyAdmin, but there are native Mac applications as well which are probably great too. Even MySQL AB makes one that's free. So you need to evaluate your needs and your server administration skillset. But it sounds like you may be able to get by just fine with Mac OS X client and MacPorts. Now, if you're already buying an Xserve, no reason not to run Mac OS X Server since it comes with it. But I would think hard about whether to pay $999 for Mac OS X Server for another machine, money which might do much more good if spent on upgraded hardware.
Hi Ryan - Thanks for your suggestions. Since I will be admin-ing my own machines I want to keep things as simple as possible. I'm planning to buy Mac Pro for my web server so I can dispense with the rack hardware, thus my need to decide whether to buy OSX Server- its an extra 500 euro that could be spent on other things. I'll try installing apache2 or lighthttpd and php5 on my macbook and let you know if I run into any problems getting them up and running. cheers Mike
Sun, 29 Apr 2007 (04:26 -0500 UTC) Ryan Schmidt wrote:
The mod_perl port exists for the MacPorts version of Apache 1.
% port info mod_perl mod_perl 1.29, Revision 2, www/mod_perl (Variants: universal, darwin_6) http://perl.apache.org/ {Embeds a Perl interpreter in the Apache 1.3 server} Library Dependencies: perl5.8, apache Platforms: darwin freebsd Maintainers: bchesneau@mac.com Note that mod_perl 1.29 is susceptable to a moderately critical DoS attack as is mod_perl 2.0.2. See http://search.cpan.org/~gozer/mod_perl-1.30/Changes SECURITY: CVE-2007-1349 (cve.mitre.org) fix unescaped variable interpolation in Apache::PerlRun regular expression to prevent regex engine tampering. reported by Alex Solovey [Randal L. Schwartz <merlyn@stonehenge.com>, Fred Moyer <fred@redhotpenguin.com>] Both have been upgraded to versions greater than are found in macports. The upgrade from MP 1.29 to 1.30 is trivial--requiring a checksum change and the version change. For example on my iMacs I have % port installed mod_perl The following ports are currently installed: mod_perl @1.30_2 I decided to manage apache2 on my own. -- Dr. Robert Delius Royar Associate Professor of English Morehead State University Morehead, Kentucky
Michael Thon <mike012012@yahoo.com> on Sunday, April 29, 2007 at 1:44 AM -0800 wrote:
I have been looking through the macports web site for documentation on installing these packages but I can't find any. Is any needed? It looks like I will need to have the right set of variants to get all these packages installed and talking to one another correctly. I also assume that I need to install the macports version of Apache and that I can't use the one installed with OS X? Is there a tutorial somewhere for setting up a web server with macports?
For the Apache2, MySQL, and PHP5 combination see if my NeDi howto helps. http://homepage.mac.com/duling/halfdozen/NeDi-Howto.html Mark
robert delius royar <apple@frinabulax.org> on Sunday, April 29, 2007 at 7:58 AM -0800 wrote:
% port info mod_perl mod_perl 1.29, Revision 2, www/mod_perl (Variants: universal, darwin_6) http://perl.apache.org/
{Embeds a Perl interpreter in the Apache 1.3 server}
Library Dependencies: perl5.8, apache Platforms: darwin freebsd Maintainers: bchesneau@mac.com
Note that mod_perl 1.29 is susceptable to a moderately critical DoS attack as is mod_perl 2.0.2. See http://search.cpan.org/~gozer/mod_perl-1.30/Changes SECURITY: CVE-2007-1349 (cve.mitre.org) fix unescaped variable interpolation in Apache::PerlRun regular expression to prevent regex engine tampering. reported by Alex Solovey [Randal L. Schwartz <merlyn@stonehenge.com>, Fred Moyer <fred@redhotpenguin.com>]
Both have been upgraded to versions greater than are found in macports. The upgrade from MP 1.29 to 1.30 is trivial--requiring a checksum change and the version change.
I just upgraded them to 1.30 and 2.0.3. They had outstanding tickets that I closed also so the maintainer is not listening anymore. Mark
participants (4)
-
markd@macports.org
-
Michael Thon
-
robert delius royar
-
Ryan Schmidt