赞助连接

赞助连接

阅 读 文 章

没事做了个openvpn的ha,共享一下

[来源:网上转载 (http://bbs.chinaunix.net) | 作者:网友(网络转载) | 时间:2008-04-19 | 浏览: 人次 ]

以前遇到过这样的项目,但当时根本不了解ha,现在没事验证了一下heartbeat 的CRM,还真好用,哈哈











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 CentOS+ha+openvpn配置文档.rar (5.69 KB)
 

好文章


收藏起来先,以后慢慢研究。


重启服务? 那用户都断了?

鼓励一下,继续加强,做到用户不断
TAG标签 : 共享 用户 配置 服务器 your server openvpn ha 出现

最新评论 共有0位网友发表了评论

发表评论

评论内容:不能超过250字,需审核,请自觉遵守互联网相关政策法规。
用户名:(注册)
密码:
验证码:
匿名发表
网站地图友情连接交流论坛网站投稿广告服务联系我们留言本站长统计
Some rights reserved: www.newhtm.com, 鄂ICP备07010232号 E-mail:chinakafei@live.com,QQ:552766
中国咖啡技术网(Chmhome):国外编程技术书籍,中文编程手册,经典编程文章,交流技术,技术软件下载,计算机论文,毕业论文.