Nginx安装部署


 
安装:
 
  • 下载安装包并解压 

 

  • 环境准备(所需库文件见百度网盘)

GCC编译器(系统已自带,C语言编译器)

Automake工具(系统已自带)

openssl 库(支持ssl模块,需下载)

zlib 库(支持gzip模块,需下载)

pcre 库(支持rewrite模块,需下载)

               
  • 执行源代码编译安装 

openssl(./config && make && make install)

pcre( ./configure && make && make install)

zlib(./configure && make && make install)

nginx( ./configure && make && make install)

 
 
基本配置:
 
  • nginx安装后会拷贝配置文件到/usr/local/nginx/conf/nginx.conf,下次如果需要改配置要直接改这个配置文件
 
  • 完整配置实例(参考《Nginx完整配置实例》)
 
 
基本命令:
 
  • 启动:/usr/local/nginx/sbin/nginx
 
  • 停止:/usr/local/nginx/sbin/nginx -s stop
 
 
 
 
 
 
 
 
 
 
 
 
参考资料:
posted @ 2017-02-15 20:42  二十六度半  阅读(278)  评论(0编辑  收藏  举报