Home > Backend Development > PHP Tutorial > RetHat65 Nginx installation

RetHat65 Nginx installation

WBOY
Release: 2016-08-08 09:19:49
Original
915 people have browsed it

1) Before installing nginx, we must first ensure that the system has g++, gcc, openssl-devel, pcre-devel and zlib-devel software installed (just install it through the data source that comes with Linux)

2) Download pcre-8.10.tar.gz nginx-1.1.1.tar.gz and put under the /home/nginx directory

Unzip nginx

tar zxvf nginx-1.9.3.tar.gz
Copy after login


After unzipping nginx, there will be nginx-1.9.3 folder under /home/nginx

cd nginx-1.9.3
./configure --prefix=/usr/local/nginx --with-http_stub_status_module
make
make install
Copy after login


Check whether the installation is successful

cd  /usr/local/nginx/sbin
./nginx -t
Copy after login


If the result displays as follows:

nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Copy after login


, it means the installation is successful.

3)Start nginx

cd /usr/local/nginx/sbin
./nginx
Copy after login


4) Check whether the startup is successful

Enter the URL in the browserhttp://yourserver (IP of your own machine)

If

is displayed, it means the startup is successful.

5) Stop Nginx

pkill -9 nginx
Copy after login

Copyright Statement: This article is the original article of the blogger and may not be reproduced without the permission of the blogger.

The above introduces the installation of RetHat65 Nginx, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
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