How to Configure nginx + php + mysql on mac

Source: Internet
Author: User

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...

Related Article

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.