Linux之网络配置(十)负载均衡

负载均衡

安装步骤

[root@google gohb]# yum -y install gcc-c++ gcc openssl pcre-devel zlib-devel
#下载相关服务
[root@google gohb]# cd Desktop/
[root@google Desktop]# tar zxvf nginx-1.17.9.tar.gz
#解压文件
[root@google Desktop]# cd nginx-1.17.9/
[root@google nginx-1.17.9]# ./configure
[root@google nginx-1.17.9]# make && make install
#编译并安装
[root@google nginx-1.17.9]# cd /usr/local/nginx/conf/
[root@localhost conf]# vi nginx.conf

在这里插入图片描述
在这里插入图片描述在这里插入图片描述

[root@google conf]# useradd nginx
#添加用户
[root@google nginx]# cd sbin/
[root@google sbin]# ./nginx
#启动nginx

测试结果

[root@google sbin]# ab -c 100 -n 10000 http://192.168.139.129/dvwa/login.php

在这里插入图片描述

[root@google sbin]# ab -c 100 -n 20000 http://192.168.139.129/dvwa/login.php

在这里插入图片描述

发布了77 篇原创文章 · 获赞 5 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_39682037/article/details/104977022