This article uses the Nginx source installation
1. Download Nginx Source Package
wget Http://nginx.org/download/nginx-1.8.0.tar
or login to the Nginx website to download a higher version
2, Nginx installation needs other environment support
Does the environment have GCC installed
Rpm-qa|grep GCC
If not, yum install gcc-c++ is required
is the environment installed Pcre
The file is a regular expression library. Let Nginx support rewrite need to install this library
If it is not installed, you can install yum-y with yum Pcre-devel
Environment is installed Zlib-devel
Yum Install Zlib-devel-y
Because we need to configure SSL to support HTTPS, we also need to openssl-devel this module
Yum Install OpenSSL openssl-devel-y
OK here to complete the environment preparation
Enter the Nginx source directory to install, because we need to support HTTPS access so install the time to add SSL module
Perform
./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module
After success
Make
Make install
and then to
The green nginx is the Nginx startup command.
Execute the Nginx boot command and specify the configuration file
Browser access: HTTP://IP can see the Nginx Welcome page, if not, see if the browser firewall is blocking port 80
Configure SSL
Open our/nginx/nginx-1.8.1/conf/nginx.conf file to start the Nginx designation
Found it
Restart after configuration is complete
Then the browser with HTTPS access
Ok!
"Linux" Nginx installation using and configuring SSL support