{"id":97264,"date":"2024-06-09T06:43:11","date_gmt":"2024-06-08T22:43:11","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=97264"},"modified":"2024-06-09T06:43:11","modified_gmt":"2024-06-08T22:43:11","slug":"keepalived-nginx-attention","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/keepalived-nginx-attention.html","title":{"rendered":"\u642d\u5efakeepalived+nginx \u9ad8\u53ef\u7528\u6ce8\u610f\u4e8b\u9879"},"content":{"rendered":"
Virtual Route Redundancy Protocol\uff0c\u5373\u865a\u62df\u8def\u7531\u5197\u4f59\u534f\u8bae\u3002\u5b83\u4e3b\u8981\u662f\u5b9e\u73b0\u8def\u7531\u5668\u9ad8\u53ef\u7528\u7684\u5bb9\u9519\u534f\u8bae\u3002\u5c06\u591a\u53f0\u8def\u7531\u5668\u7ec4\u6210\u8def\u7531\u5668\u7ec4\uff08Router Group\uff09\uff0c\u7ec4\u4e2d\u5305\u62ecMaster\u53caBackup\uff0c\u5728\u5916\u90e8\u770b\u6765\u5c31\u50cf\u4e00\u53f0\u8def\u7531\u5668\uff0c\u62e5\u6709\u4e00\u4e2aVIP\u3002Master\u4f1a\u53d1\u9001\u7ec4\u64ad\u6d88\u606f\uff0c\u5f53Backup\u5728\u6307\u5b9a\u7684\u65f6\u95f4\u6536\u4e0d\u5230vrrp\u5305\u5c31\u4f1a\u8ba4\u4e3amaster\u5b95\u6389\uff0c\u7136\u540e\u901a\u8fc7VRRP\u534f\u8bae\u518d\u6b21\u7ade\u9009\u65b0\u7684\u8def\u7531\u5668\u5f53Master\uff0c\u4ece\u800c\u4fdd\u8bc1\u8def\u7531\u5668\u7684\u9ad8\u53ef\u7528\u3002<\/p>\n
systemctl stop<\/span> firewalld \u5173\u95edfirewalld\r\niptables -nvL\r\nsetenforce 0<\/span> \u4e34\u65f6\u5173\u95edselinux\r\ngetenforce\u547d\u4ee4\u67e5\u770b\u662f\u5426\u4e3aPermissive\r\n<\/pre>\n\n- keepalived\u7684\u811a\u672c\u9700\u8981\u8bbe\u7f6e\u6210755\u6743\u9650\uff0c\u5426\u5219\u6709\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5b9e\u9a8c\u5931\u8d25<\/li>\n
- \u67e5\u770bvip\u7684\u65f6\u5019\uff0c\u53ea\u80fd\u4f7f\u7528 ip add \u547d\u4ee4 \u67e5\u770b\uff0c\u800c ifconfig\u547d\u4ee4 \u662f\u65e0\u6cd5\u67e5\u770b\u7684<\/li>\n
- yum\u5b89\u88c5\u7684nginx\uff0c\u9ed8\u8ba4\u7684\u7d22\u5f15\u9875\u5728 \/usr\/share\/nginx\/html\/index.html<\/li>\n<\/ol>\n
\n\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/my.oschina.net\/zhaojunhui\/blog\/1619748<\/a><\/p>\n