LVS+keepalived+rsyslog部署日誌採集UDP協議



本文原創,禁止轉載,版權全部,違者必究,本文中略有帶過的東西,設計到工做環境架構,能夠留言探討,謝謝。linux

                        LVS部署vim

部署環境:架構

Centos 6.5 64ide

安裝軟件包spa

ipvsadm-1.24.tar.gz  設計

keepalived-1.2.7.tar.gz 3d

kernel-devel-2.6.18-402.el5.x86_64.rpm  rest

rsyslog-8.4.0-1.el6.x86_64.rpmblog

rsyslog-relp-8.4.0-1.el6.x86_64.rpm圖片

rsyslog-udpspoof-8.4.0-1.el6.x86_64.rpm

popt-1.13-7.el6.x86_64.rpm

popt-1.13-7.fc13.src.rpm

wKiom1ftEIbBIPRMAABUqVv-AyY335.png-wh_50

安裝所需依賴包:

yum install -y popt-static kernel-devel make gcc openssl-devel lftplibnl* popt* openssl-devel lftplibnl* popt* libnl* libpopt* gcc+

 

關閉防火牆:

Iptables -F

service Iptables save

 

修改selinux

sed -i 's/SELINUX=enforcing/#SELINUX=enforcing/' /etc/selinux/config

sed -i 's/SELINUXTYPE=targeted/#SELINUXTYPE=targeted/' /etc/selinux/config

echo -e "SELINUX=disabled" >>/etc/selinux/config 

 

 

安裝IPvsadm

1、建立內核軟連接,否則編譯會報錯 *重要

wKioL1ftDWPAhWxiAAANig1u8VM142.png-wh_50

2.6.32-642.el6.x86_64/ 內核版本 重要一步


2、安裝軟件包

wKioL1ftDYOwxcPXAAAQ0vy45DQ876.png-wh_50

cd ipvsadm-1.24

wKiom1ftDaiCqomkAAAKI4jxxnk704.png-wh_50

三、開啓或重啓

/etc/init.d/ipvsadm start  stop


---------------------------------------

安裝keepalived

安裝依賴包

yum -y install openssl-devel popt-devel libnl-devel

cd /usr/local/src/

tar -xzvf keepalived- 1.2.7.tar.gz


wKiom1ftDiGDSyWIAAAUQaAfWLs436.png-wh_50

wKiom1ftDiGzWx_HAAAK_qGvWj4933.png-wh_50

wKioL1ftDiGjkxtwAAALbF0h05k773.png-wh_50

wKioL1ftDiKy80CBAAAImgLkOhM496.png-wh_50

wKiom1ftDiKzEuPLAAALeGfCa2Q618.png-wh_50

wKioL1ftDiLiknfrAAAKH38MnKE688.png-wh_50


這裏本文用到輪詢加DR

進入配置文件

vim /etc/keepalived/keepalived.conf

wKioL1ftDsHjLQ1RAAED1nXXIEo526.png

wKioL1ftDsHws8pTAAEVKMKrsSE226.png

wKiom1ftDsGgGRIAAAA4ZGWFSV8425.png

wKioL1ftDsLDqFIhAAB5DZQKDQk386.png


重啓配置文件

/etc/init.d/keepalived restart   重啓配置文件

 

安裝rsyslog的步驟我就再也不敘述了

和上面差很少同樣

修改rsyslog.conf

wKiom1ftD0rAlhzfAAEcKU2EGoA083.png

wKioL1ftD0vSXKdUAAE1YtgEEHI932.png

wKiom1ftD0uhLTEdAAFKPoicP74707.png

相關文章
相關標籤/搜索