Nginx installation
System platform: centos release 6.6 (final) 64-bit.
First, install compilation tools and library files
yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
Second, first of all, install pcre.
The function of pcre is to make ngnix support rewrite function.
1. Download the pcre installation package at the following address:
2. Unzip the installation package:
Install nginx
1. Download nginx at the following address:
2. Unzip the installation package
At this point, nginx installation is complete.
Nginx configuration
Create a user for nginx operation www:
Start nginx
Nginx startup command is as follows:
visit a website
Access our configured site ip from the browser:
Nginx other commands
The following contains several commands commonly used by nginx:
/usr/local/webserver/nginx/sbin/nginx-sreload # Reload the configuration file/usr/local/webserver/nginx/sbin/nginx-sreopen # Restart nginx/usr/local/webserver/nginx/sbin/nginx-sstop # Stop Nginx.
Copyright Description:No reproduction without permission。
Knowledge sharing community for developers。
Let more developers benefit from it。
Help developers share knowledge through the Internet。
Follow us