nginx-01

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx-01相关的知识,希望对你有一定的参考价值。

系统 centos

1、下载

nginx.org 下载网站 http://nginx.org/  ------------>本次选择的版本  http://nginx.org/download/nginx-1.11.3.tar.gz

nginx-upstream-fair --->  https://github.com/gnosek/nginx-upstream-fair

echo-nginx-module ---> wget https://github.com/openresty/echo-nginx-module/archive/v0.59.tar.gz

ngx_cache_purge-2.3  --->  http://labs.frickle.com/nginx_ngx_cache_purge/

2、将下载的包解压到路径 /usr/local/src

3、创建路径命令

  mkdir -p /usr/local/nginx/{logs,conf,fastcgi_temp,sbin,client_body_temp,proxy_temp,uwsgi_temp,scgi_temp}

4、进入nginx目录

./configure --prefix=/usr/local/nginx/
--sbin-path=/usr/local/nginx/sbin/
--with-http_ssl_module
--conf-path=/usr/local/nginx/conf/nginx.conf
--pid-path=/usr/local/nginx/logs/nginx.pid
--error-log-path=/usr/local/nginx/logs/error.log
--http-log-path=/usr/local/nginx/logs/access.log
--http-fastcgi-temp-path=/usr/local/nginx/fastcgi_temp
--http-client-body-temp-path=/usr/local/nginx/client_body_temp
--http-proxy-temp-path=/usr/local/nginx/proxy_temp
--http-uwsgi-temp-path=/usr/local/nginx/uwsgi_temp
--http-scgi-temp-path=/usr/local/nginx/scgi_temp
--add-module=/usr/local/src/echo-nginx-module-0.59
--add-module=/usr/local/src/nginx-upstream-fair
--add-module=/usr/local/src/ngx_cache_purge-2.3

 

make

make install

5、进入 /usr/local/nginx/sbin/

  执行 nginx

6、访问IP

  

Welcome to nginx!

If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.

 
















以上是关于nginx-01的主要内容,如果未能解决你的问题,请参考以下文章

nginx 01-Nginx简介

重识Nginx - 01 Nginx 主要应用场景及版本概述

Nginx 01 - 负载均衡

Linux学习-Nginx学习实现https

重识Nginx - 系列导读

Docker-compose实现nginx反向代理