负载均衡
安装步骤
[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