摘要: 根据用户的uri信息进行负载分担 1、架构环境规划 web01 10.0.0.7 web02 10.0.0.8 web03 10.0.0.9 lb01 10.0.0.5 lb02 10.0.0.6 /upload 集群-10.0.0.8:80 html/www/upload upload服务器集群 阅读全文
posted @ 2021-08-30 13:55 Cai_HL 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 功能模块: ngx_http_upstream_module upstream 负载均衡 ngx_http_proxy_module proxy_pass 反向代理 反向代理:proxy_pass模块,将接收到的请求抛给后面的反向代理服务器,由它 去寻找目标服务器获取数据。 负载均衡:upstrea 阅读全文
posted @ 2021-08-30 13:52 Cai_HL 阅读(39) 评论(0) 推荐(0) 编辑
摘要: upstream:实现不同的调度功能 1、轮询分配(rr):将请求平均分配给各个web主机。 [root@lb02 ~]# curl www.test.com 10.0.0.7 www.test.com [root@lb02 ~]# curl www.test.com 10.0.0.8 www.te 阅读全文
posted @ 2021-08-30 13:49 Cai_HL 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 日志功能配置 访问日志:/var/log/nginx/access.log ngx_http_log_module log_format main ' $remote_addr - $remote_user [$time_local] "$request" ' ' $status $body_byt 阅读全文
posted @ 2021-08-30 13:46 Cai_HL 阅读(148) 评论(0) 推荐(0) 编辑
摘要: yum安装 a 使用官方yum源进行安装 安装的是最新版本 软件目录结构比较标准(推荐) b 使用非官方yum源进行安装 安装的不是最新版本 目录结构会发生变化 编译安装 1、 wget http://nginx.org/download/nginx-1.18.0.tar.gz PS: 解决软件的依 阅读全文
posted @ 2021-08-30 11:27 Cai_HL 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 注意:要将firewalld、SELINUX关闭 systemctl stop firewalld systemctl disable firewalld sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config setenforce 0 阅读全文
posted @ 2021-08-30 11:04 Cai_HL 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 注:要将firewalld、SELINUX关闭 systemctl stop firewalld systemctl disable firewalld sed -ri '/^SELINUX=/cSELINUX=disabled' /etc/selinux/config setenforce 0 一 阅读全文
posted @ 2021-08-30 10:34 Cai_HL 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 一、下载源码、依赖和编译工具 [root@localhost opt]# wget https://www.php.net/distributions/php-7.2.34.tar.gz [root@localhost opt]# yum -y install gcc gcc-c++ make ph 阅读全文
posted @ 2021-08-28 16:03 Cai_HL 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 一、下载源码包 编译工具:make、gcc、gcc-c++ [root@centos7-1 opt]# wget https://www.php.net/distributions/php-7.2.34.tar.gz -P /opt [root@centos7-1 opt]# tar -xvf ph 阅读全文
posted @ 2021-08-28 15:55 Cai_HL 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 一、下载源码和安装编译工具 https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-boost-5.7.32.tar.gz [root@centos opt]# yum -y install ncurses ncurses-devel bison cm 阅读全文
posted @ 2021-08-28 15:43 Cai_HL 阅读(44) 评论(0) 推荐(0) 编辑
>