重装 lvs
之前装了 ipvsadm 和 keepalived
用 rpm -e ipvsadm 意见通过
但 rpm -e keepalived 时,提示
[root@lvs1 ipvs]# rpm -e keepalived-1.2.7
error reading information on service keepalived: No such file or directory
error: %preun(keepalived-1.2.7-3.el6.x86_64) scriptlet failed, exit status 1
这上面是我删除 /etc/keepalived/* /sbin/keepalived /etc/init.d/keepalived 之后出现的
解决如下:
查看 keepalived 完整安装包文件
[root@lvs1 ipvs]# rpm -qa | grep keepalived
keepalived-1.2.7-3.el6.x86_64
强制干掉
[root@lvs1 ipvs]# rpm -e –noscripts keepalived-1.2.7-3.el6.x86_64
[root@lvs1 ipvs]# rpm -qa | grep keepalived
解决问题
还有情况,就是在能停止 keepalived 服务情况下:
[lvs]# rpm -qa | grep keepalived
keepalived-1.2.7-3.el6.x86_64
[lvs]# rpm -qa | grep ipvsadm
ipvsadm-1.25-10.el6.x86_64
[lvs]# service keepalived stop
Stopping keepalived: [ OK ]
[lvs]# rpm -e keepalived
warning: /etc/keepalived/keepalived.conf saved as /etc/keepalived/keepalived.conf.rpmsave
[lvs]# service keepalived stop
keepalived: unrecognized service
[lvs]# rpm -qa | grep keepalived
[lvs]# rpm -e ipvsadm
[lvs]# rpm -qa | grep ipvsadm