标签:wget start evel 配置 base 阿里云 服务器 make 服务
1.安装keepalived
下载依赖: yum -y install gcc pcre-devel zlib-devel openssl-devel
换源为阿里云的,准备下载keepalived,没有wget的先yum install wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all
yum makecache
下载keepalived
yum -y install keepalived
2.配置keepalived
vi /etc/keepalived/keepalived.conf
主:
然后ip add show 绑定的网卡名,发现多了你配置的ip。
同样跑去设置一下从服务器
然后service keepalived start
同样的ip add show +网卡
nginx:负载均衡实战(二)nginx=keepalived
标签:wget start evel 配置 base 阿里云 服务器 make 服务
原文地址:https://www.cnblogs.com/daysn/p/10106553.html