Tag:fss pac Command taf bre logs master red host
The simplest and most straightforward way to [http://www.cnblogs.com/redirect/p/6112154.html] is to use the Apache and PHP that comes with your Mac. 1. Start apache1> launch Apache $sudo apachectl start;2> start, enter localhost in the browser and you can see It works on the page. The default root directory for 3>apache (index.html.en file under/library/webserver/documents/) is/library/webserver/documents/ 2. Add Apache support for PHP 1> Open http.conf config file: sudo vim/etc/apache2/httpd.conf2> find the following code and remove the comment (remove the previous ' # '), Wq Save the exit. LoadModule php5_module libexec/apache2/libphp5.so 3. Restart Apache for debugging PHP type files: sudo apachectl restart in Apache root directory /library/webserver/documents/Create a new project folder and write a php file output ' Hello World '. At this point, you can see Hello World normally when the browser opens http://localhost/project/test.php (if you have permission problems, sudo chown Yourname:staff project Where Yourname is your own name) 4. Use homebrew to install the MySQL installation homebrewruby-e "$ (Curl-fssl https://raw.githubusercontent.com/ Homebrew/install/master/install) "Installation mysqlbrew install MySQL boot mysqlmysql.server start apache common Commands// Start Apache service sudo apachectl start//restart Apache service sudo apachectl restart//offClose Apache service sudo apachectl stop//view Apache version httpd-v
Mac Raiders (1)--Simple configuration of the PHP development environment