Amount... I thought I could use the lnmp one-key installation package on the mac, but I found that it didn't work...
Later, we used homebrew recommended for installation... It is not too difficult for you to search online for specific tutorials...
Here we will talk about the problem of installing nginx... If you use homebrew to install nginx, you cannot add a third-party module... At least I have been searching for a long time, and stackoverflow has not found a solution...
Finally, you can only manually compile and install nginx, php, mysql, and pecl through homebrew...
Probably record my installation steps:
1. Download the nginx source code from the official website and decompress it.
2. cd to the decompressed folder.
3. Execute./configure-prefix =/usr/local/Cellar/nginx-1.4.0-add-module =/path/to/your/modules
4. make & make install
After the installation is successful, enter the/usr/local/Cellar/nginx-1.4.0/sbin sudo nginx to start the nginx service... If you don't want to be so troublesome, you need to add the PATH/usr/local/Cellar/nginx-1.4.0/sbin to the PATH, you can use the command vi/etc/paths to open the PATH to add it in, in this way, you can directly start the service in sudo nginx in any path ..
That's all...
In this configuration process, errors are often reported by error_log, saying that this directory is not available. Generally, the solution to this problem is to find the conf file and change the path of error_log, or you have write permission on wood... If an error is reported, it means that has no permission should be added before the command is executed...