Source:blog.csdn.net Author:quantseven original link: here
A CentOS7.0 under the installation of Nginx 1.7.4 tutorial, pro-Test effective. The following tutorials are directly:
First, installation Preparation
First, because some of the Nginx modules rely on some Lib library, so before installing Nginx, you must first install these Lib libraries, these dependent libraries mainly have g++, GCC, openssl-devel, pcre-devel and Zlib-devel so execute the following command installation.
$ ./configure $ default installation in/usr/local/nginx $ make $ make Install
Second, install Nginx
Before installing, it is advisable to check if Nginx is installed.
$ find-name Nginx
If the system already has Nginx installed, then uninstall it first.
$ Yum Remove Nginx
First enter the/usr/local directory.
$ cd/usr/local
Download the latest version of Nginx from the official website.
$ wget http://nginx.org/download/nginx-1.7.4.tar.gz
Unzip the Nginx compressed package.
$ TAR-ZXVF nginx-1.7.4.tar.gz
will produce a nginx-1.7.4 directory, then enter the nginx-1.7.4 directory.
$ CD nginx-1.7.4
Next install, use the--prefix parameter to specify the Nginx installation directory, make, make install installation.
$ ./configure $ default installation in/usr/local/nginx $ make $ make Install
If there is no error, after the successful completion, it is best to look at the Nginx installation directory.
$ Whereis Nginx
Once the installation is complete, you can start or stop it by entering the post-installation directory (/usr/local/nginx).
In this, the use of CentOS installation Nginx has been completed, in fact, it is quite simple to see.
#建站 "Installing Nginx 1.7.4 under CentOS7.0"