{"id":18570,"date":"2024-11-19T20:06:31","date_gmt":"2024-11-19T12:06:31","guid":{"rendered":"https:\/\/fwq.ai\/blog\/?p=18570"},"modified":"2024-11-19T20:06:31","modified_gmt":"2024-11-19T12:06:31","slug":"keepalived%e7%9a%84%e5%ae%89%e8%a3%85%e4%b8%8e%e5%90%af%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/18570\/","title":{"rendered":"Keepalived\u7684\u5b89\u88c5\u4e0e\u542f\u52a8"},"content":{"rendered":"<p>\u5b98\u65b9\u7684\u4e0b\u8f7d\u5730\u5740\uff1ahttp:\/\/www.keepalived.org\/download.html<\/p>\n<p>&nbsp;<\/p>\n<h1>\u4e00\u3001\u5b89\u88c5<\/h1>\n<pre># tar xzf keepalived-1.3.4.tar.gz\r\n# cd keepalived-1.3.4\r\n# .\/configure --prefix=\/usr\/local\/keepalived\/\r\n# make &amp;&amp; make install<\/pre>\n<p><strong>Tips 1\uff1a<\/strong>\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u63d0\u793a\uff1a*** WARNING \u2013 this build will not support IPVS with IPv6. Please install libnl\/libnl-3 dev libraries to support IPv6 with IPVS.<\/p>\n<pre># yum install -y libnl3.x86_64\r\n# yum install -y libnl3-devel.x86_64<\/pre>\n<p><strong>Tips 2\uff1a<\/strong>configure: error: !!! Please install libnfnetlink headers. !!!<\/p>\n<pre># yum install -y libnfnetlink.x86_64 \r\n# yum install -y libnfnetlink-devel.x86_64<\/pre>\n<h1>\u4e8c\u3001\u914d\u7f6e<\/h1>\n<p>\u914d\u7f6e\u53ef\u4ee5\u53c2\u8003\uff1aKeepalived\u7684\u914d\u7f6e\u8be6\u89e3<\/p>\n<h1>\u4e09\u3001\u542f\u52a8<\/h1>\n<p>\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4 \/usr\/local\/keepalived\/sbin -h \u53c2\u770b\u5404\u542f\u52a8\u53c2\u6570\u3002<\/p>\n<pre>\u542f\u52a8\r\n# .\/keepalived -f \/usr\/local\/keepalived\/etc\/keepalived.conf<\/pre>\n<h3>\u00a0\u5236\u4f5c\u5feb\u6377\u542f\u52a8<\/h3>\n<p>\u5728\u6e90\u6587\u4ef6\u7684\u76ee\u5f55.\/keepalived-1.3.4\/keepalived\/etc\/init.d\u4e0b\u67093\u4e2a\u4e09\u4e2a\u5feb\u6377\u542f\u52a8\u7684\u6587\u4ef6\u3002<\/p>\n<pre># cp .\/keepalived-1.3.4\/keepalived\/etc\/init.d\/keepalived \/etc\/init.d\/\r\n# cp  \/usr\/local\/keepalived\/etc\/keepalived\/keepalived.conf \/etc\/keepalived\/\r\n# cp .\/keepalived-1.3.4\/keepalived\/etc\/sysconfig\/keepalived \/etc\/sysconfig\/keepalived\r\n\r\n\uff03keepalived\u7684\u5feb\u6377\u542f\u52a8\uff0c\u5fc5\u987b\u8981\u6267\u884c\u4ee5\u4e0a\u4e09\u6b65\uff0c\u4e14\u6587\u4ef6\u8def\u5f84\u5fc5\u987b\u4e00\u81f4\uff0c\u4e5f\u4e0d\u77e5\u9053\u4ec0\u4e48\u539f\u56e0\uff0c\r\n# \u53ef\u80fd\u662finit.d\u4e2d\u7684keepalived\u4e2d\u5df2\u7ecf\u6307\u660e\u4e86\u5427<\/pre>\n<p><strong>\u00a0\u8fd9\u6837\u53ef\u4ee5\u6267\u884cservice keepalived [start | stop | reload | restart ]<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b98\u65b9\u7684\u4e0b\u8f7d\u5730\u5740\uff1ahttp:\/\/www.keepalived.org\/download.html &nbsp; \u4e00\u3001\u5b89\u88c5 # tar xzf keepalived-1.3.4.tar.gz # cd keepalived-1.3.4 # .\/configure &#8211;prefix=\/usr\/local\/keepalived\/ # make &amp;&amp; make install Tips 1\uff1a\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u63d0\u793a\uff1a*** WARNING \u2013 this build will not support IPVS with IPv6. Please install libnl\/libnl-3 dev libraries to support IPv6 with IPVS. # yum install -y libnl3.x86_64 # yum install -y libnl3-devel.x86_64 Tips 2\uff1aconfigure: error: !!! Please [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-18570","post","type-post","status-publish","format-standard","hentry","category-os"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18570","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=18570"}],"version-history":[{"count":1,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18570\/revisions"}],"predecessor-version":[{"id":18571,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/18570\/revisions\/18571"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=18570"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=18570"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=18570"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}