{"id":46533,"date":"2023-04-22T13:28:39","date_gmt":"2023-04-22T05:28:39","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=46533"},"modified":"2023-04-22T13:28:39","modified_gmt":"2023-04-22T05:28:39","slug":"redhat7-haproxy-weblb","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/redhat7-haproxy-weblb.html","title":{"rendered":"RHEL 7\u914d\u7f6eHAProxy\u5b9e\u73b0Web\u8d1f\u8f7d\u5747\u8861"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u672c\u6587\u5c06\u7b80\u5355\u4ecb\u7ecd\u4f7f\u7528HAProxy\u5b9e\u73b0web\u8d1f\u8f7d\u5747\u8861\uff0c\u4e3b\u8981\u5185\u5bb9\u5305\u62ec\u57fa\u4e8e\u6743\u91cd\u7684\u8f6e\u8be2\u3001\u4e3aHAProxy\u914d\u7f6ehttps\u3001\u914d\u7f6ehttp\u91cd\u5b9a\u5411\u4e3ahttps\u3001\u914d\u7f6eHAProxy\u4f7f\u7528\u72ec\u7acb\u65e5\u5fd7\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u4e00\u3001\u6d4b\u8bd5\u73af\u5883<\/strong><\/div>\n HAProxy\uff1a<\/strong><\/span><\/div>\n \u4e3b\u673a\u540d\uff1aRH7-HAProxy WEB01:<\/strong><\/span><\/div>\n \u4e3b\u673a\u540d\uff1aRH7-Web-01 WEB02:<\/strong><\/span><\/div>\n \u4e3b\u673a\u540d\uff1aRH7-Web-02 \u4e8c\u3001WEB\u9875\u9762\u8bbf\u95ee\u6d4b\u8bd5<\/strong><\/div>\n 1\u3001\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee\u4e24\u53f0web\u7684IP\u5730\u5740\uff0c\u80fd\u6210\u529f\u8bbf\u95ee\u5230\u4e0d\u540c\u7684\u9875\u9762\uff0c\u65b9\u4fbf\u6211\u4eec\u540e\u9762\u76f4\u89c2\u5730\u89c2\u5bdf\u8d1f\u8f7d\u5747\u8861\u7684\u6548\u679c\u3002\u7531\u4e8eApache\u7684\u5b89\u88c5\u914d\u7f6e\u4e0d\u662f\u672c\u6587\u91cd\u70b9\uff0c\u5177\u4f53\u53ef\u53c2\u8003\u672c\u4eba\u4e4b\u524d\u7684\u535a\u6587\u300aRedHat 7\u5b89\u88c5\u914d\u7f6eApache 2.4\u300b 2\u3001\u5728RH7-HAProxy\u4e0a\u4e5f\u8bbf\u95ee\u4e00\u4e0b\u4e24\u53f0Web\uff0c\u786e\u8ba4\u4e5f\u53ef\u4ee5\u6b63\u5e38\u8bbf\u95ee \u4e09\u3001\u5b89\u88c5\u914d\u7f6eHAProxy<\/strong><\/div>\n [root@RH7-HAProxy~]yum -y install haproxy\r\n[root@RH7-HAProxy~]systemctl start haproxy\r\n[root@RH7-HAProxy~]systemctl enable haproxy\r\n[root@RH7-HAProxy~]mv \/etc\/haproxy\/haproxy.cfg \/etc\/haproxy\/haproxy.cfg.bak\r\n[root@RH7-HAProxy~]vi \/etc\/haproxy\/haproxy.cfg\r\n<\/pre>\n |