Mac Raiders (1)--Simple configuration PHP development environment

Source: Internet
Author: User
Tags configuration php php development environment

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.