mode one: Install Nginx on Mac, install the corresponding dependency in turn
Pcre
./configure--prefix=/usr/local/pcre-8.37--libdir=/usr/local/lib/pcre--includedir=/usr/local/include/pcre make && make Install
Zlib
./configure--prefix=/usr/local/zlib make && make install
Openssl
./config--prefix=/usr/local/openssl make && make install
Final execution:
./configure--prefix=/usr/local/nginx--with-http_ssl_module--with-pcre=/usr/local/lib/pcre--with-zlib=/usr/ local/zlib-1.2.8--with-openssl=/usr/local/openssl make && make install
Under normal circumstances, this kind of installation is OK, but I am very back, is not OK, in exchange for another way to install through the homebrew
Way Two: Homebrew
First install homebrew (http://brew.sh/)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
等待完成后执行
install nginx
Wait for the installation to complete without human intervention
Performsudo nginx
Due to the reasons of the celestial kingdom, VPN may be required to ensure the normal installation!
Seventh, Nginx Install on Mac