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 kin开发者_StackOverflow中文版d of virtual port mapping or whatever-may-work-without-root?
Thanks!
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).
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.
Or grant sudo access to the user.
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.
精彩评论