I want to learn how to configure the PHP development environment on Mac. Thank you! I want to learn how to configure the PHP development environment on Mac. Thank you!
Reply content:
I want to learn how to configure the PHP development environment on Mac. Thank you!
This is my tutorial on installing Lnmp on Mac.
Configure the Lnmp environment for Mac
Apache in Mac, input
sudo apachectl start
Start Apache.
Input
sudo vi /etc/apache2/httpd.conf
Open the configuration file of Apche.
Method 1
Mac OS 10.10.1 and later versions all have their own Apache and PHP environments. You only need to start the corresponding service and then OK!
Under the terminal
1.Sudo apachectl start // start the Apache service
Sudo apachectl restart // restart the Apache service
Sudo apachectl stop // disable Apache service
Httpd-v // view Apache version
2.Root directory of Apache website server under Macbook proUnder the/Library/WebServer/Documents path
Edit the http. conf configuration file:sudo vim /etc/apache2/httpd.conf
Remove the following comments:LoadModule php5_module libexec/apache2/libphp5.so
Remember to restart
Test the test file
MySQL needs to download it by yourself .....
* Method 2Download MAMP. I am using it. Haha *
1. Download an XAMPP for mac
This software mainly includesApache, PHP5, MySQL, and phpMyAdminAnd so on.
2. You can download it from the official website http://www.apachefriends.org/en/xampp-macosx.html.
3. Double-click and continue the installation. In the application folder, an XAMPP folder contains an XAMPP Control Pannel application to Control the platform.
4. Configure php. ini and open./Application/xampp/etc/php. ini.
Http: // 115.28.155.116/wordpress /? P = 193
This is an installation tutorial written by myself. You can check it out.
Usemamp pro
Right. Convenient and quick... PHP 7 is supported in the latest version.
Lnmp.org
Vagrant https://liuzhichao.com/p/1940.html available
My solution is apache + homebrew.
It has been used for two years.
1. Homebrew is mainly used to install everything conveniently, so that you can avoid delays in the construction period due to environment configuration problems during your work.
2. If you do not want to use the built-in APACHE, you can use Homebrew to install one, NGINX
3. The disadvantage of Homebrew is that it cannot replace you to install many of the latest things, or you need to manually compile and install them.
4. You can also learn something like go node by the way ..
Xampp. Http://rj.baidu.com/soft/detail/25759.html? Ald
Configure Nginx + PHP + MySQL in OS X
Https://kotori.love/archives/install-nginx-php-mysql-on-osx.html
1. Download brew
2. brew install php nginx mysql
Brew is a useful management tool.
Equivalent to centos yum and ubuntu apt-get
Https://www.apachefriends.org/zh_cn/index.html
What if I use an integrated environment?
MAMP integrated environment https://www.mamp.info/en/ that can be used directly
It is recommended that you use homebrew to install the development environment. Various components can be customized and installed. The configuration files and other files are in a standard location. The extension package installation is also very convenient. You can refer to the following tutorial or Google it yourself.
Http://yansu.org/2013/12/11/lamp-in-mac.html
Install homebrew and then brew install the components you need. Very simple.
Https://www.apachefriends.org/zh_cn/index.html
This is the fastest and simplest
Both php and python are installed, and mac is the same as dumb.