Home > Backend Development > PHP Tutorial > centos7 install nginx

centos7 install nginx

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-29 09:11:48
Original
1003 people have browsed it

Install nginx
Download the installation package
http://nginx.org/en/download.html Download the latest nginx-1.9.6.tar.gz
Put it into centos 7 /usr/local
Unzip tar -zxvf nginx-1.9 .6.tar.gz
Create the nginx directory mkdir /usr/local/nginx
Enter the decompression directory cd /usr/local/nginx-1.9.6
Install nginx
Next, install, use the --prefix parameter to specify the directory where nginx is installed , make, make install installation
./configure $The default installation is in /usr/local/nginx


If there is an error message: ./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with- openssl= options.
Solution:
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/usr/local/nginx

Continue to install
make

make install

The startup command of nginx is:

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

Restart

/usr/local/nginx/sbin/ nginx -s reload

The above introduces the installation of nginx on centos7, including the require content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template