First install PCRE pcre-devel, and Zlib, because the configuration nginx time will need two things
PCRE (Perl Compatible Regular Expressions) is a Perl library, including perl-compatible regular expression library. The module uses nginx http pcre regular expressions to parse, so it is necessary to install pcre library on linux, pcre-devel pcre developed using a secondary development library. nginx also need this library. Command:
yum -y install PCRE PCRE-devel
zlib library provides a variety of compression and decompression of the way, nginx using zlib the contents of the package are http gzip, so you need to install on Centos zlib library.
yum install -y zlib zlib-devel
although I installed the installation of the two children on it, but if necessary, according to error prompts may also need GCC and OpenSSL
yum install gcc-c ++
yum -y install OpenSSL OpenSSL-devel
good, now we begin to install nginx, 1.14.0 this is the latest version of
wget -c https://nginx.org/download/nginx-1.14.0.tar.gz
unzip and enter the directory nginx
tar -zxvf nginx-1.14.0. the tar.gz
CD-1.14.0 nginx
default configuration using the nginx
./configure
compiler installation
the make
the make install
Finding the installation path:
whereis nginx
into the sbin directory, you can see there is an executable file nginx, direct ./ executed on OK.
At this time also you need to enter, such as Ali cloud cloud control console platform open to 80 ports;
What problems arise:
Indeed the above operation has been successfully installed and started the nginx; you can enter the following command to see:
netstat -anp | grep 80
At this time, when the access but still not visit, you need to execute the following command
firewall-cmd --state
The last successful page:
These are personal environment to build, for reference only:
Refer to the following URL: https: //blog.csdn.net/qq_32953079/article/details/81975160 nginx installation
nginx access timeout problem: https: //www.cnblogs.com/shanheyongmu/p/10710152.html