Tommy B.
Tommy B.

Reputation: 3659

Running a local instance of apache without admin rights on Mac OS X

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!

Upvotes: 4

Views: 5965

Answers (4)

Ryan Chouinard
Ryan Chouinard

Reputation: 2076

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.

Upvotes: 0

bobdiaes
bobdiaes

Reputation: 1110

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.

Upvotes: 4

sdot257
sdot257

Reputation: 10366

Or grant sudo access to the user.

Upvotes: 0

Lekensteyn
Lekensteyn

Reputation: 66465

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).

Upvotes: 9

Related Questions