前言
前段时间学习到nginx配合使用keepalived做高并发,可是keepalived每每安装失败 不管是安装包还是yum命令都不管用,经过了几天的钻牛角尖,算是找到了原因所在。centos7有自带的mariadb数据库,而安装mysql的小前提是卸载它,这貌似是没问题的,可是keepalived缺需要依赖mariadb数据库……矛盾由此而成
在这里我就不做失败的演示了
使用yum命令安装
相关依赖:yum install -y curl gcc openssl-devel libnl3-devel net-snmp-devel
安装keepalived:yum -y install keepalived
使用命令开启,查看状态及自启动keepalived
systemctl start keepalived.service
systemctl status keepalived.service
systemctl enable keepalived.service
这样keepalived就算是安装好了,有兴趣的可以使用命令reboot关个机再查看一下keepalived的状态是否是开启的