NGINX-1.6.3部署详情

Nginx_沁贰百科

  • 介绍

Nginx (engine x) 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器。Nginx是由伊戈尔·赛索耶夫为俄罗斯访问量第二的Rambler.ru站点(俄文:Рамблер)开发的,第一个公开版本0.1.0发布于2004年10月4日。
其将源代码以类BSD许可证的形式发布,因它的稳定性、丰富的功能集、示例配置文件和低系统资源的消耗而闻名。2011年6月1日,nginx 1.0.4发布。
Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器,并在一个BSD-like 协议下发行。其特点是占有内存少,并发能力强,事实上nginx的并发能力确实在同类型的网页服务器中表现较好,中国大陆使用nginx网站用户有:百度、京东、新浪、网易、腾讯、淘宝等。

功能

  • 支持操作系统
  • 结构与扩展
  • 实验特性
  • HTTP基础功能
  • 其他HTTP功能

 模块依赖性

  • gzip模块需要 zlib 库
    rewrite模块需要 pcre 库
    ssl 功能需要openssl库

一、部署 Nginx

  1. 论证环境:Centos 6.8  nginx-1.6.3
  2. 下载地址:1、点我点我iqvg) 2、Nginx官网自己找去~

1、解压并进入目录

tar -zxvf nginx-1.6.3.tar.gz
cd nginx-1.6.3

2、提前解决nginx的依赖关系

yum install -y openssl openssl-devel pcre pcre-devel gcc

4、创建nginx用户

useradd nginx -s /sbin/onlogin -M

5、设定配置信息(设定用户、组、路径、模块)

./configure --user=nginx --group=nginx --prefix=/application/nginx-1.6.3/ --with-http_stub_status_module --with-http_ssl_module

6、./conf完成后 编译安装

make && make install

7、创建软连接

ln -s /application/nginx-1.6.3/ /application/nginx

8、停止、启动、重启 nginx

[root@web01 nginx]# /application/nginx/sbin/nginx -s stop
[root@web01 nginx]# /application/nginx/sbin/nginx
[root@web01 nginx]#/application/nginx/sbin/nginx -s reload

9、查看端口状态

[root@web01 nginx]# ss -lntup |grep nginx
tcp LISTEN 0 128 *:80 *:* users:(("nginx",pid=6134,fd=6),("nginx",pid=6124,fd=6)

恭喜,以上步骤OK后部署就完成了。

猜你喜欢

转载自www.cnblogs.com/wangqiner/p/9177522.html