Home >Backend Development >PHP Tutorial >RetHat65 Nginx installation
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
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
Check whether the installation is successful
cd /usr/local/nginx/sbin ./nginx -t
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
, it means the installation is successful.
3)Start nginx
cd /usr/local/nginx/sbin ./nginx
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
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.