码迷,mamicode.com
首页 > 其他好文 > 详细

NGINX 之 安装方法 一

时间:2018-07-16 12:23:12      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:软件   enable   war   evel   创建   tls   module   soft   nss   

NGINX 之 安装方法 一

1、下载NGINX编译包

wget http://nginx.org/download/nginx-1.6.3.tar.gz

2、创建nginx软件所需的用户与组

[root@localhost software]# useradd www -s /sbin/nologin -M       #不能登陆,不带家目录
[root@localhost software]# groupadd www                                     #创建组

3、安装nginx所需要的依赖包

[root@localhost software]# yum -y install pcre pcre-devel gcc-c++ zlib-devel zlib open-ssl openssl-devel

4、开始安装NGINX

[root@localhost software]# tar -zxvf nginx-1.6.3.tar.gz
[root@localhost software]# cd nginx-1.6.3
[root@localhost nginx-1.6.3]# ./configure --user=www --group=www --with-http_ssl_module --prefix=/app/nginx-1.6.3
[root@localhost nginx-1.6.3]# make && make install
[root@localhost nginx-1.6.3]# ll /app/nginx-1.6.3/                 #安装成功
总用量 16
drwxr-xr-x 2 root root 4096 7月  16 11:32 conf
drwxr-xr-x 2 root root 4096 7月  16 11:32 html
drwxr-xr-x 2 root root 4096 7月  16 11:32 logs
drwxr-xr-x 2 root root 4096 7月  16 11:32 sbin

5、查看nginx当前安装了那些模块

[root@localhost nginx-1.6.3]# ./sbin/nginx -V
nginx version: nginx/1.6.3
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) 
TLS SNI support enabled
configure arguments: --user=www --group=www --with-http_ssl_module --prefix=/app/nginx-1.6.3

6、给当前安装的NGINX添加一个新模块功能,如:状态模块--with-http_stub_status_module

NGINX 之 安装方法 一

标签:软件   enable   war   evel   创建   tls   module   soft   nss   

原文地址:http://blog.51cto.com/12965094/2144041

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!