Install homebrew, Nginx, PHP, Mysql on Mac

Source: Internet
Author: User
Tags curl fpm install homebrew

Preparatory work

The new Mac OS has built-in Apache and PHP, and you can view the Apache and PHP version numbers with the following commands:

# httpd-V
Installing homebrew

The homebrew under the Mac is equivalent to Apt-get, Yum under Linux, and can get the latest version of the various installation packages.

" $ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install) "

After the installation is complete, run the following command to check if the installation was successful

Brew Doctor

Update, upgrade under Brew source

Brew Update && Brew upgrade
Installing Nginx
Install Nginx

Modifying a configuration file

sudo vim/usr/local/etc/nginx/nginx.conf    #修改默认的8080端口为80

Set a self-starter

sudo cp -v/usr/local/opt/nginx/homebrew.mxcl.nginx.plist/library/launchdaemons/sudochown Root:wheel/library/launchdaemons/homebrew.mxcl.nginx.plist

Start Nginx Service

sudo launchctl load/library/launchdaemons/homebrew.mxcl.nginx.plist

Now listen to port 80 by default and run the following command to test

Curl-il http://127.0.0.1:80

View Nginx Help

Nginx-h

Stop Nginx Service

sudo launchctl unload/library/launchdaemons/homebrew.mxcl.nginx.plist
php-fpm

Because brew does not contain PHP-FPM by default, you must first add a

Install homebrew, Nginx, PHP, Mysql

on your Mac

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.