Compile and install nginx centos7

1, install the build environment

yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel

2, the official website to download nginx nginx source package
Compile and install nginx centos7
selection map stable version, and stores the root directory nginx

3, enter the directory extracting archive

nginx-tar -xf 1.16.0.tar.gz

4, cd into the extracted directory

cd nginx-1.16.0/

5, configure the installation directory

./configure --prefix = / usr / local / nginx
I installed in the / usr / local /

6, make the compiler

7, make install installation

Guess you like

Origin blog.51cto.com/14482279/2427223