yum -y install gcc gcc* openssl openssl-devel pcre pcre-devel perl-ExtUtils-Embed ncurses ncurses-devel cmake
cd nginx-1.9.6
./configure --prefix=/usr/local/nginx-1.9.6 --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_realip_module --with-http_perl_module --with-stream --add-module=/usr/src/ngx_cache_purge-2.3 --with-pcre
make && make install