tags:

views:

94

answers:

4

Hi!

I'd like to make a portable version of apache/php to develop locally.

But the problem is about binding a port. That process requires admin rights, which I don't have on my workstation.

I'd like to compile an apache/php version which I'd transfer on my workstation and run it without any rights requirements.

I read about privbind, but in the end, you still need those damn admin rights!

Any idea about maybe some kind of virtual port mapping or whatever-may-work-without-root?

Thanks!

+8  A: 

You really need root privileges to bind any port below 1024, 80 is not an exclusion. Consider using a higher port, like 8080 (or something less common).

Lekensteyn
A: 

Or grant sudo access to the user.

luckytaxi
That's not really portable (sudo), and sudo is actually giving root permissions.
Lekensteyn
but you can limit limit what the user can run. But I agree, he'll have to modify the port to something other than port 80.
luckytaxi
You can only limit *what* applications can be run. But after that, you're granting full root privileges to that application.
Lekensteyn
+2  A: 

You don't need to compile it yourself, get it from here: http://bitnami.org/stack/mampstack

It uses higher than 1024 port numbers by default, so it should be fine without admin privileges. Includes Apache, PHP, MySQL and phpMyAdmin.

bobdiaes
A: 

Apache/PHP comes bundled by default on MacOS. My Snow Leopard install has PHP 5.3.2.

Honestly, though, I'm not 100% sure if PHP was updated when I installed XCode or not. More information about the bundled version is on the PHP Website.

MySQL is not included, however. Some people also prefer to use bundled installers which include separate versions of Apache and PHP, and bundle MySQL. I favor Zend Server CE, but others seem to favor MAMP.

Ryan Chouinard