首页
开发手册
应用中心
工具
用户中心
MacOS Run Development Environment
English
中文简体
English
上一篇
下一篇
MacOS Run Development Environment It is very convenient for us to build the Apache+PHP+MySql environment on the Mac, because the Mac is pre-installed with Apache and PHP, which are not started by default. Here we provide the startup method. Start the macos terminal and enter in the command line. ```c sudo apachectl start ``` Normal situation has started. Open website inputhttp://localshot appear **It works!** Indicates that apache started successfully Next we need to start php support, enter in the terminal. ```c cd /etc/apache2 sudo vi httpd.conf ``` find out LoadModule php5_module libexec/apache2/libphp5.so Some systems are LoadModule php5_module libexec/apache2/libphp7.so ![](data/files/edit/20/03/23/200323_00235291.png) Just remove the # in front, you need to press the keyboard i first, and the terminal will appear -- insert -- Indicates that the document can be edited at this time. After editing Ctrl c then Shift z z save and exit We support php at this time when we restart apache in the terminal. ```c sudo apachectl restart ``` The project directory is in /Library/WebServer/Documents The Chinese system catalog is in /Repository/WebServer/Documents Under the directory, we create index.php ```php ``` Execute to see if the php 5 message appears to indicate success. ![](data/files/edit/20/03/23/200323_00316898.png) Copy FoundPHP to this directory to run it (I don’t know macos particularly about various problems that often occur, and it is recommended to use windows development instead of wasting useless time.)