1 Download and install pcre
Default mac not installed wget, mounted with the following command:
$ brew install wget
Download pcre to the current directory
$ wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
After the download, unzip, configure, make, make install:
$ Tar jxvf pcre-8.43.tar.gz
$cd pcre-8.43
$ ./configure
$ make
$ make install
2 download and install Nginx
From this address to download the latest stable version is now 1.16.0
http://nginx.org/download/nginx-1.16.0.tar.gz
After the extract to the current directory into the source directory
$ tar xvf nginx-1.16.0.tar.gz
$ cd nginx-1.16.0
Generate configuration
$ ./configure --prefix=/usr/local/nginx
Compile and install
After installation is located in / at usr / local / nginx directory, and the directory structure as follows:
Change nginx directory is owned by the current user, the default is root
$ sudo chown -R username:admin nginx
Nginx into the sbin directory under the installation directory, start nginx
$ ./nginx
Open your browser and enter http: //127.0.01 see the following page, the installation configuration is complete.