centos6 安装 keepalived

安装keepalived

yum -y install kernel-devel

ln -s /usr/src/kernels/2.6.32-642.15.1.el6.x86_64/ /usr/src/linux

cd /usr/local/src/
wget http://www.keepalived.org/software/keepalived-1.2.20.tar.gz
tar -zxvf keepalived-1.2.20.tar.gz
cd keepalived-1.2.20

./configure
make && make install

生成keepalived 的启动命令
cp /usr/local/etc/rc.d/init.d/keepalived /etc/init.d/

配置启动脚本的参数:
cp /usr/local/etc/sysconfig/keepalived /etc/sysconfig/

配置文件默认路径:
mkdir /etc/keepalived

拷贝配置文件到默认路径:
cp /usr/local/etc/keepalived/keepalived.conf /etc/keepalived/

cp /usr/local/sbin/keepalived /usr/sbin/

/etc/init.d/keepalived start

ps -ef |grep keepalived

cd /etc/keepalived/
cp keepalived.conf keepalived.conf.default
vim keepalived.conf

: notification_email {
  [email protected]
}

router_id LVS_01

vrrp_instance VI_1 {
 state MASTER
 interface eth0
 virtual_router_id 51
 priority 150
 advert_int 1
 authentication {
 auth_type PASS
 auth_pass 1111
 }
 virtual_ipaddress {
 192.168.1.190/24 (2台机都一样,是ip addr 添加的虚拟IP)
 }
 }

/etc/init.d/keepalived start
ip addr add 192.168.1.190/24 dev eth0
ip addr

ip add|grep 192.168.1.190(只能在一台机有结果输出,不然就是裂脑了)

可以ping 同主,backup 有VIP(虚拟IP) 就认为是裂脑了

时间: 2024-10-21 18:55:42

centos6 安装 keepalived的相关文章

CentOS6.5环境 安装Keepalived和高可用服务相关参数说明

一.硬件环境准备kep1 192.168.89.100    masterkep2 192.168.89.101    slave 二.安装keepalived(两台服务器都要安装)yum -y install keepalived 三.启动keepalived并检查1.两台服务器上启动keep服务[[email protected] ~]# /etc/init.d/keepalived start正在启动 keepalived:                                 

oracle 11g centos6 安装

选型:32位的内存是个瓶颈,已经是64位的时代了.使用64位的CentOS6 和 64位的Oracle 11g R2在虚拟机器安装,采用hostonly方式设置网络注意:能上网的网卡要设置一下ICS(Internet连接共享)给VMware Network Adapter VMnet1这样对于虚拟机,网关是192.168.137.1,IP地址请也要设置在192.168.137.0/24段硬盘40G,内存2G 1.下载软件1.1.CentOS 6(x86_64)http://mirrors.163

CentOS 7.0 安装keepalived

1.安装目录包 yum install -y net-tools psmisc 2.安装keepalived yum install -y ipvsadm keepalived 3.master配置文件 ! Configuration File for keepalived global_defs {    notification_email {      [email protected]      [email protected]      [email protected]    }

CentOS6安装 Oracle 11g R2

选型:32位的内存是个瓶颈,已经是64位的时代了.使用64位的CentOS6 和 64位的Oracle 11g R2在虚拟机器安装,采用hostonly方式设置网络注意:能上网的网卡要设置一下ICS(Internet连接共享)给VMware Network Adapter VMnet1这样对于虚拟机,网关是192.168.137.1,IP地址请也要设置在192.168.137.0/24段硬盘40G,内存2G 1.下载软件1.1.CentOS 6(x86_64)http://mirrors.163

CENTOS6 安装配置 pptpd 心得

1.你所需要的软件 pppd    ppp拨号服务器pptpd   在pppd拨号的基础上增加pptpd的支持 2.确定你的内核是否支持mppe modprobe ppp-compress-18 && echo ok 如果显示ok,那么恭喜,你的内核已经具备了mppe支持.请到第4部分 3.升级内核支持mppe wget http://poptop.sourceforge.net/yum/stable/packages/dkms-2.0.17.5-1.noarch.rpmwget http

CentOS安装Keepalived

一.VRRP(虚拟路由器冗余协议) 虚拟路由冗余协议(Virtual Router Redundancy Protocol,简称VRRP)是由IETF提出的解决局域网中配置静态网关出现单点失效现象的路由协议,1998年已推出正式的RFC2338协议标准.VRRP广泛应用在边缘网络中,它的设计目标是支持特定情况下IP数据流量失败转移不会引起混乱,允许主机使用单路由器,以及及时在实际第一跳路由器使用失败的情形下仍能够维护路由器间的连通性. 二.Keepalived Keepalived是基于VRRP

linux(centOS6) 安装Mysql 5.6.19数据库步骤、 问题以及相应的解决办法

数据库版本:Ver 14.14 Distrib 5.6.19, for Linux (x86_64) using  EditLine wrapper linux版本: Linux version 2.6.32-279.el6.x86_64 ([email protected]) (gcc ve rsion 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 20 12 采用的rpm安装方式. 1.官网下载

Centos7 安装keepalived实现高可用

场景:尝试安装keepalived实现高可用,进而在suse环境中部署. 测试过程需要配合Nginx的相关知识:Centos7 Nginx安装 1 安装过程 问题 !!! OpenSSL is not properly installed on your system. !!! !!! Can not include OpenSSL headers files. 解决方法: yum -y install openssl-devel

Centos6安装FreeSWITCH 1.5时./configure问题解决记录

系统:Centos 6.4 64位: FreeSWITCH版本:1.5 具体的安装过程参考FreeSWITCH 官网wiki (也可以参考我的博客<Centos6安装FreeSWITCH>) 从FreeSWITCH 安装过程./configure 时遇到sqlite 的问题开始: checking for sqlite3 >= 3.6.20… Package sqlite3 was not found in the pkg-config search path. Perhaps you