Mac installs Brew and Nginx

Source: Internet
Author: User
Tags install brew

1. Install Brew

Run the following code:

The installation commands are as follows:
CURL-LSSF Http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz-c/usr/local--strip 1

When the brew installation is successful, you can install the software you want, such as wget, as follows:
sudo brew install wget

If you uninstall, the command is as follows:
sudo brew uninstall wget

To view the installation software, the command is as follows:
sudo brew search/apache*/

Note that/apache*/is used for regular expressions, used/split.

2. Installing Nginx

1) Brew Search Nginx

2) Brew Install Nginx

Start Nginx, sudo nginx; visit localhost:8080 found the Welcome page of Nginx has appeared.

Remark: Ln-s/usr/local/sbin/nginx/usr/bin/nginx make a soft connection.
The commonly used directives are:
Nginx-v view version, and profile address
Nginx-v View Version
NGINX-C filename designation configuration file
Nginx-h Help

#重新加载配置 | restart | stop | exit nginx

Nginx-s Reload|reopen|stop|quit

#打开 Nginx

sudo nginx

#测试配置是否有语法错误

Nginx-t

Mac installs Brew and Nginx

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.