VeryNginx(centos7)

简介:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
我的博客已迁移到xdoujiang.com请去那边和我交流
VeryNginx功能强大并且拥有友好界面的Nginx
 
Nginx 运行状态分析
每秒请求数
响应时间
网络流量
网络连接数
请求过滤
 
IP
UserAgent
请求路径 (URI)
请求参数
访问统计
 
总请求次数
各状态码次数
返回总字节数
每请求平均字节数
总响应时间
平均响应时间
 
一、基础环境
1、角色、ip、内核、发行版本
serverA 192.168.159.133 3.10.0-327.el7.x86_64 CentOS Linux release 7.2.1511 (Core) 
nginx version: openresty /1 .9.15.1
 
二、安装VeryNginx
1、添加nginx用户
useradd  -s  /bin/false  -d  /opt/verynginx/  -m nginx
 
2、安装基础包 一会编译时需要用到的一些库
yum -y  install  make  git gcc pcre-devel pcre openssl openssl-devel
 
3、下载并编译安装openresty
wget https: //openresty .org /download/openresty-1 .9.15.1. tar .gz
tar  zxvf openresty-1.9.15.1. tar .gz
cd  openresty-1.9.15.1
. /configure  --prefix= /opt/verynginx/openresty  --user=nginx --group=nginx --with-http_v2_module --with-http_sub_module --with-http_stub_status_module --with-luajit
make
make  install
 
4、修改配置文件
cd  ~
git clone https: //github .com /alexazhou/VeryNginx .git
cp  -r ~ /VeryNginx/verynginx  /opt/verynginx
yes | cp  VeryNginx /nginx .conf  /opt/verynginx/openresty/nginx/conf/
chown  nginx.nginx  /opt/verynginx/  -R
 
5、添加快捷方式
find  / -name  "nginx"
/opt/verynginx/openresty/nginx/sbin/nginx
cp  /opt/verynginx/openresty/nginx/sbin/nginx  /usr/bin/nginx
 
6、启动nginx服务
nginx
 
7、看下进程
ps  -ef| grep  nginx
root      22663      1  0 12:19 ?        00:00:00 nginx: master process nginx
nginx     22664  22663  0 12:19 ?        00:00:00 nginx: worker process
 
8、看下端口
netstat  -tupnl| grep  nginx
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      22663 /nginx : master 
 
9、看下相关日志
[root@localhost ~] # ll /opt/verynginx/openresty/nginx/logs
total 4
-rw-r--r-- 1 root root 0 Nov 23 12:19 access.log
-rw-r--r-- 1 root root 0 Nov 23 12:19 error.log
-rw-r--r-- 1 root root 6 Nov 23 12:19 nginx.pid
 
10、登录地址和用户名和密码在
cat  /opt/verynginx/verynginx/lua_script/VeryNginxConfig .lua
 
11、效果图

wKioL1g1Lv_Qol3bAABfe_ZGnw0673.png-wh_50

wKioL1g1LwDQxCG3AAEJhSvRVt4320.png-wh_50

1
2
12、参考文章
https: //github .com /alexazhou/VeryNginx









本文转自 xdoujiang 51CTO博客,原文链接:http://blog.51cto.com/7938217/1875765,如需转载请自行联系原作者
目录
相关文章
|
7月前
|
Linux Shell 网络安全
CentOS这些情况你一定遇到过
CentOS这些情况你一定遇到过
|
存储 Java Linux
centos 8.2 指南(1)
centos 8.2 指南(1)
|
存储 监控 关系型数据库
centos 8.2 指南(2)
centos 8.2 指南(2)
centos 8.2 指南(2)
|
JavaScript Linux
|
JavaScript Linux 前端开发
|
开发工具
|
Linux 开发工具

热门文章

最新文章