Nginx基础(Nginx Foundation)

Nginx

简介:

Nginx是一款轻量级Web服务器、也是一款反向代理服务器

作用:

1 Nginx能直接支持Rails和PHP的程序
2 可作为HTTP反向代理服务器
3 作为负载均衡服务器
4 作为邮件代理服务器
5 帮助实现前端动静分离

特点:

高稳定、高性能、资源占用少、功能丰富、模块化结构、支持热部署

安装:

依赖
1 安装gcc(yum install gcc)
2 安装pcre (yum install pcre-devel)
3 安装zlib (yum install zlib zlib-devel)
4 安装openssl (yum install openssl openssl-devel)
备注:如需要支持ssl,才需要安装openssl

综合命令;yum -y install gcc zlib zlib-devel pure-level openssl openssl-devel

5 下载源码包,选择稳定版本,解压缩安装(http://www.nginx.org/)
Wget xxxx
tar -zxvf xxxx

6 Nginx安装
(1)进入nginx目录之后执行./configure
1.也可以指定安装目录,增加参数—prefix=/usr/nginx
2.如果不指定路径,可以通过whereis nginx进行查询
3.默认安装在/usr/local/nginx

(2) 继续执行make
(3)继续执行 make install

踩坑:

1 安装依赖提示参数错误,无法安装类似错误,可以更新一下yum源,参考:https://blog.csdn.net/u011630259/article/details/104001808
安装方法参考;https://www.cnblogs.com/shiyuelp/p/11945882.html

————————

Nginx

Introduction:

Nginx is a lightweight web server and a reverse proxy server

effect:

1 nginx can directly support rails and PHP programs
2 can be used as an HTTP reverse proxy server
3 as a load balancing server
4 as a mail proxy server
5. Help realize the dynamic and static separation of the front end

characteristic:

High stability, high performance, less resource occupation, rich functions, modular structure and support hot deployment

Installation:

依赖
1 安装gcc(yum install gcc)
2 安装pcre (yum install pcre-devel)
3 安装zlib (yum install zlib zlib-devel)
4 安装openssl (yum install openssl openssl-devel)
备注:如需要支持ssl,才需要安装openssl

综合命令;yum -y install gcc zlib zlib-devel pure-level openssl openssl-devel

5 download the source package, select the stable version, extract and install( http://www.nginx.org/ )
Wget xxxx
tar -zxvf xxxx

6 nginx installation
(1) Execute after entering the nginx directory/ configure
1. You can also specify the installation directory and add a parameter – prefix = / usr / nginx
2. If no path is specified, you can query through whereis nginx
3. It is installed in / usr / local / nginx by default

(2) Continue making
(3) Continue with make install

Stepping pit:

1 installation dependency prompt parameter error, unable to install similar error, you can update the yum source, refer to: https://blog.csdn.net/u011630259/article/details/104001808
Installation method reference; https://www.cnblogs.com/shiyuelp/p/11945882.html