CentOS 6.7 安装sheepdog
安装epel源
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
更新yum
yum -y update
安装sheepdog
yum install -y sheepdog
配置corosync
cd /etc/corosync
cp corosync.conf.example corosync.conf
编辑corosync.conf,修改bindnetaddr为自己的网段
# Please read the corosync.conf 5 manual page
compatibility: whitetank
totem {
version: 2
secauth: off
threads: 0
# Note, fail_recv_const is only needed if you're
# having problems with corosync crashing under
# heavy sheepdog traffic. This crash is due to
# delayed/resent/misordered multicast packets.
# fail_recv_const: 5000
interface {
ringnumber: 0
bindnetaddr: 192.168.1.0
mcastaddr: 226.94.1.1
mcastport: 5405
}
}
logging {
fileline: off
to_stderr: no
to_logfile: yes
to_syslog: yes
# the pathname of the log file
logfile: /var/log/cluster/corosync.log
debug: off
timestamp: on
logger_subsys {
subsys: AMF
debug: off
}
}
amf {
mode: disabled
}
配置防火墙规则
iptables -A INPUT -p igmp -j ACCEPT
iptables -A INPUT -m addrtype --dst-type MULTICAST -j ACCEPT
iptables -A INPUT -p udp -m state --state NEW -m multiport --dport 5404,5405 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 7000 -j ACCEPT
启动服务
/etc/init.d/corosync restart
service iptables restart
/etc/init.d/sheepdog restart
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
更新yum
yum -y update
安装sheepdog
yum install -y sheepdog
配置corosync
cd /etc/corosync
cp corosync.conf.example corosync.conf
编辑corosync.conf,修改bindnetaddr为自己的网段
# Please read the corosync.conf 5 manual page
compatibility: whitetank
totem {
version: 2
secauth: off
threads: 0
# Note, fail_recv_const is only needed if you're
# having problems with corosync crashing under
# heavy sheepdog traffic. This crash is due to
# delayed/resent/misordered multicast packets.
# fail_recv_const: 5000
interface {
ringnumber: 0
bindnetaddr: 192.168.1.0
mcastaddr: 226.94.1.1
mcastport: 5405
}
}
logging {
fileline: off
to_stderr: no
to_logfile: yes
to_syslog: yes
# the pathname of the log file
logfile: /var/log/cluster/corosync.log
debug: off
timestamp: on
logger_subsys {
subsys: AMF
debug: off
}
}
amf {
mode: disabled
}
配置防火墙规则
iptables -A INPUT -p igmp -j ACCEPT
iptables -A INPUT -m addrtype --dst-type MULTICAST -j ACCEPT
iptables -A INPUT -p udp -m state --state NEW -m multiport --dport 5404,5405 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 7000 -j ACCEPT
启动服务
/etc/init.d/corosync restart
service iptables restart
/etc/init.d/sheepdog restart
还没人转发这篇日记