: This article mainly introduces how to install Brew on Mac and how to install nginx through brew. if you are interested in the PHP Tutorial, refer to it.
The installation command is as follows:
Curl-LsSf http ://Github. Com/mxcl/homebrew/tarball/master | sudo tar xvz-C/usr/local -- strip 1
After brew is installed successfully, you can install the software you want, for example, wget. the command is as follows:
Sudo brew install wget
To uninstall the SDK, run the following command:
Sudo brew uninstall wget
Run the following command to view and install the software:
Sudo brew search/apache */
1. brew search nginx
2. brew install nginx
Start nginx and sudo nginx; access localhost: 8080 and find that the nginx welcome page has appeared.
Note: make a soft connection between ln-s/usr/local/sbin/nginx/usr/bin/nginx.
Common commands include:
View nginx-V version and configuration file address
View nginx-v version
Nginx-c filename specifies the configuration file
Nginx-h help
# Reload configuration | restart | stop | exit nginx
Nginx-s reload | reopen | stop | quit
# Enable nginx
Sudo nginx
# Test whether the configuration has syntax errors
Nginx-t
In addition, the following command is attached to install brew on Mac:
The installation command is as follows:
Curl-LsSf http ://Github. Com/mxcl/homebrew/tarball/master | sudo tar xvz-C/usr/local -- strip 1
After brew is installed successfully, you can install the software you want, for example, wget. the command is as follows:
Sudo brew install wget
To uninstall the SDK, run the following command:
Sudo brew uninstall wget
Run the following command to view and install the software:
Sudo brew search/apache */
Note/apache */is usedRegular expression, Separated.