linux Nginx 的安装

linux Nginx 的安装,第1张

概述确保安装了 gcc,openssl-devel,pcre-devel,zilb-devel   下载官网:http://nginx.org/     [[email protected] tools]# wget http://nginx.org/download/nginx-1.6.3.tar.gz --2017-10-21 10:43:52--  http://nginx.org/downlo

确保安装了 gcc,openssl-devel,pcre-devel,zilb-devel

 

下载官网:http://nginx.org/

 

 

[[email protected] tools]# wget http://Nginx.org/download/Nginx-1.6.3.tar.gz --2017-10-21 10:43:52--  http://Nginx.org/download/Nginx-1.6.3.tar.gz Resolving Nginx.org... 95.211.80.227,206.251.255.63,2001:1af8:4060:a004:21::e3,... Connecting to Nginx.org|95.211.80.227|:80... connected. http request sent,awaiting response... 302 Found Location: http://101.247.192.67/files/32230000052D57CD/Nginx.org/download/Nginx-1.6.3.tar .gz [following]--2017-10-21 10:43:53--  http://101.247.192.67/files/32230000052D57CD/Nginx.org/download/ Nginx-1.6.3.tar.gzConnecting to 101.247.192.67:80... connected. http request sent,awaiting response... 200 OK Length: 805253 (786K) [application/octet-stream] Saving to: “Nginx-1.6.3.tar.gz”   100%[===============================================>] 805,253      840K/s   in 0.9s      2017-10-21 10:43:54 (840 KB/s) - “Nginx-1.6.3.tar.gz” saved [805253/805253]   [[email protected] tools]# ls Nginx-1.6.3.tar.gz [[email protected] tools]# mkdir -p /application/Nginx [[email protected] tools]# ls Nginx-1.6.3.tar.gz [[email protected] tools]# tar -zxf Nginx-1.6.3.tar.gz [[email protected] tools]# ls Nginx-1.6.3  Nginx-1.6.3.tar.gz [[email protected] tools]# cd Nginx-1.6.3  [[email protected] Nginx-1.6.3]# useradd Nginx -s /sbin/nologin -M [[email protected] Nginx-1.6.3]# ./configure \ > --with-http_stub_status_module \ > --prefix=/application/Nginx \ > --with-http_gzip_static_module \ > --user=Nginx \ > --group=Nginx \ [[email protected] Nginx-1.6.3]# make&&make install [[email protected] Nginx]# ln -s /application/Nginx /application/Nginx-1.6.3 [[email protected] application]# /application/Nginx/sbin/Nginx -t Nginx: the configuration file /application/Nginx/conf/Nginx.conf Syntax is ok Nginx: configuration file /application/Nginx/conf/Nginx.conf test is successful [[email protected] application]# /application/Nginx/sbin/Nginx [[email protected] /]# lsof -i :80 COMMAND  PID  USER   FD   TYPE DEVICE SIZE/OFF NODE name Nginx   6125  root    6u  IPv4  22127      0t0  TCP *:http (ListEN) Nginx   6126 Nginx    6u  IPv4  22127      0t0  TCP *:http (ListEN)

 

 

 

 

#--with-http_stub_status_module 可以启用 nginx 的 nginxstauts 功能,以监控 nginx 当前状态

总结

以上是内存溢出为你收集整理的linux Nginx 的安装全部内容,希望文章能够帮你解决linux Nginx 的安装所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1019955.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存