Nginx installation and deployment and nginx deployment
Installation:
- Download the installation package and decompress it
- Environment preparation (for required database files, see Baidu online storage)
GCC compiler (the system already comes with C language compiler)
Automake tool (included in the System)
Openssl library (supports the ssl module and must be downloaded)
Zlib library (supports the gzip module and must be downloaded)
Pcre Library (support for rewrite module, download required)
- Execute source code compilation and Installation
Openssl (./config & make install)
Pcre (./configure & make install)
Zlib (./configure & make install)
Nginx (./configure & make install)
Basic Configuration:
- After nginx is installed, the configuration file is copied to/usr/local/nginx/conf/nginx. conf. Next time you need to change the configuration file
- Complete configuration instance (refer to Nginx complete configuration instance)
Basic commands:
- Start:/usr/local/nginx/sbin/nginx
- Stop:/usr/local/nginx/sbin/nginx-s stop
References:
- Http://blog.csdn.net/grhlove123/article/details/47834673