Heartbeat+openvpn配置文档
Make:zhangdongsheng
Time:2008-4-12
一. 操作系统
CentOS 4.6全完安装
二. 文档说明
本文档只是对openvpn服务器做了一个ha,并没有指出openvpn client的配置,至于配置请参考网上资料。(非常多)
三. IP及主机名规化
node1 eth0 192.168.1.116 eth1 192.168.1.117
node2 eth0 192.168.1.118 eht1 192.168.1.119
vip 192.168.1.120
四. Heartbeat 安装
# yum install heartbeat
五. Openvpn安装配置(node1配置)
# rpm -ihv lzo-1.08-4.2.el4.rf.i386.rpm
# rpm -ihv openvpn-2.0.9-1.el4.rf.i386.rpm
# mkdir /etc/openvpn/ -p
# cp /usr/share/doc/openvpn-2.0.9/sample-config-files/server.conf /etc/openvpn/
# cp -r /usr/share/doc/openvpn-2.0.9/easy-rsa/ /etc/openvpn/
# cd /etc/openvpn/easy-rsa/
# chmod 777 *
# source vars
# ./clean-all
# ./build-ca
出现“Common Name (eg, your name or your server's hostname) []:”时输入server,别的默认直接回车就可以
# ./build-key-server server
出现“Common Name (eg, your name or your server's hostname) []:”时输入server
出现:“Certificate is to be certified until Aug 17 08:30:49 2017 GMT (3650 days)
Sign the certificate? [y/n]:“ 时选 y(一共有两次,别的不用管回车就可以)
# ./build-key client
出现:“Common Name (eg, your name or your server's hostname) []:”输入“client”
出现:“Certificate is to be certified until Aug 17 08:33:36 2017 GMT (3650 days)
Sign the certificate? [y/n]:“时先y
# ./build-dh
# cd keys/
# cp ca.crt server.key server.crt dh1024.pem /etc/openvpn/
六. Heartbeat的配置(node1配置)
# cd /usr/share/doc/heartbeat-2.1.3/
# cp ha.cf haresources authkeys /etc/ha.d/
# vi /etc/ha.d/ha.cf
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 30
warntime 10
initdead 120
bcast eth1
auto_failback>
2008-4-12 08:41
下载次数: 28
好文章
收藏起来先,以后慢慢研究。
重启服务? 那用户都断了?
鼓励一下,继续加强,做到用户不断
会员注册
会员登录
个人空间
发表评论