此文接 部署筆記3 ,介紹mfs高可用中的keepalived的部署.
keepalived 安裝
2. tar -xzvf keepalived-1.2.23.tar.gz
可用命令檢視相關元件的版本(rpm –qa| grep ***x)。
rpm -ivh libcom_err-devel-1.41.12-11.el6.x86_64.rpm
rpm -ivh e2fsprogs-devel-1.41.12-11.el6.x86_64.rpm
rpm -ivh keyutils-libs-devel-1.4-3.el6.x86_64.rpm
rpm -ivh libsepol-devel-2.0.41-4.el6.x86_64.rpm
rpm -ivh libselinux-devel-2.0.94-5.2.el6.x86_64.rpm
rpm -ivh krb5-devel-1.9-22.el6.x86_64.rpm
rpm -ivh zlib-devel-1.2.3-27.el6.x86_64.rpm
rpm -ivh openssl-devel-1.0.0-20.el6.x86_64.rpm
4. 安裝keepalived
cd keepalived-1.2.23
./configure --prefix=/usr/local/keepalived
make & make install
5. 註冊服務
cp /usr/local/keepalived/sbin/keepalived /usr/sbin/
cp /usr/local/keepalived/etc/sysconfig/keepalived /etc/sysconfig/
cp /usr/local/keepalived/etc/rc.d/init.d/keepalived /etc/init.d/
6. 配置
mkdir -p /etc/keepalived/
vi /etc/keepalived/keepalived.conf
chmod 755 /etc/keepalived/keepalived_drbd_mfs.sh
7. 啟動
sudo /etc/init.d/keepalived start
8. 關閉防火牆和selinux策略
vi /etc/sysconfig/selinux
修改:selinux=disabled
#setenforce 0
9. 配置iptables,新增vrrp通訊支援, 允許組播
iptables -a input -d 224.0.0.18 -j accept
10. 驗證
能ping到 /etc/keepalived/keepalived.conf 中配置的虛位址,可以用 ip a 檢視虛位址繫結情況。
11. 修改keepalived 日誌輸出。
預設keepalived 的日誌輸出到 /var/log/messages , 問題很不好查,以下修改日誌輸出。
1) vi /etc/sysconfig/keepalived
修改最後一行 keepalived_options="-d -d -s 0"
2) vi /etc/rsyslog.conf 新增
#keepalived -s 0
local0.* /var/log/keepalived.log
3) 重啟日誌服務
# /etc/init.d/rsyslog restart
4) 檢視日誌
tail -1000 /var/log/keepalived.log
12. 抓包分析keepalived 通訊
tcpdump -i eth1 -n vrrp
MooseFS 3 0部署筆記 1 原創
寫在前面,避免看到的人踩坑。moosefs目前單個檔案至少64k,就算你的報文只有1個位元組那麼大,moosefs還是會把你存成64k的檔案。所以對小檔案的儲存,空間是非常浪費的。最近公司準備實施分布式檔案系統,去年我們有同事嘗試過使用fastdfs和hdfs。從使用情況看,hdfs更適合大檔案 本...
Zabbix3 0部署最佳實踐
zabbix3 整個web 介面做了乙個全新的設計。更多新特性當前字幕檢視 筆者qq 572891887 linux架構 471443208 root linux node1 cat etc redhat release 檢視系統版本 centos linux release 7.2.1511 co...
WSS 3 0部署備忘 三
1 關於搜尋功能 2 安裝了wss 3.0 有安裝了search server 2008 折騰了一通後,解除安裝了search server 2008,結果 wss3.0 也沒得用了 悲催 3 顯而易見,支援表單身份驗證的外部站點是不支援爬網的 4 關於搜尋的乙個問題 如果只採用表單認證的方式,你會...