1. Install the required package: Yum install-yapr* autoconf automake bison bzip2 bzip2* cloog-ppl compat* cpp Curl Curl-develfontconfig FONTC Onfig-devel freetype freetype* freetype-devel gcc gcc-c++gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers k Eyutilskeyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg*libsepol-devel libselinux-devel Libstdc++-devel libtool* libgomp libxml2libxml2-devel libxpm* libtiff libtiff* make MPFR ncurses* NTP opensslopenssl-deve L Patch pcre-devel perl php-common php-gd policycoreutils telnett1lib t1lib* nasm nasm* wget zlib-devel gcc gcc-c ++autoconf automake zlib zlib-devel OpenSSL openssl-devel pcre-devel
2. Download Nginx:http://nginx.org/en/download.html
3. Unzip and install:
Tar-zxvfnginx-1.9.2.tar.gz
CD NGINX-1.9.2/
./configure
Make && Make Install
What pack is missing, and Yum complements what package, and then again./configure
4. Start Nginx:/usr/local/nginx/sbin/nginx-c/usr/local/src/nginx-1.9.2/conf/nginx.conf
See if the port is up: Netstat-anput|grep 80
Set the port inside the/usr/local/src/nginx-1.9.2/conf/nginx.conf file
Centos7 Installing Nginx