2012年6月18日 星期一

CentOS 6.2安裝NTOP 4.1.0

安裝前一定要確認可連接Internet,安裝過程中會自動下載安裝元件

安裝指令:
=======================================================================
先安裝RRDTool:
yum -y install gcc cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel
cd /opt/
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.2.tar.gz
tar zxvf rrdtool-1.4.2.tar.gz
cd rrdtool-1.4.2
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
./configure
make
make install
ln -s /opt/rrdtool-1.4.2 /usr/local/rrdtool

驗證:
cd /usr/local/rrdtool/share/rrdtool/examples/
./stripes.pl
ls -l
cp stripes.png /var/www/html/
yum -y install httpd
service httpd start
firefox http://此server的IP位址/stripes.png  &

=======================================================================
NTOP安裝:
#yum -y install gcc gcc-c++ libpcap-devel libpcap  libtool  automake  autoconf  gdbm  gdbm-devel libevent libevent-devel rrdtool rrdtool-devel zlib zlib-devel GeoIP GeoIP-devel
yum -y install gcc gcc-c++ libpcap-devel libpcap  libtool  automake  autoconf  gdbm  gdbm-devel libevent libevent-devel rrdtool rrdtool-devel zlib zlib-devel
rpm -Uvh http://pkgs.repoforge.org/geoip/geoip-1.4.6-1.el6.rf.i686.rpm
rpm -Uvh http://pkgs.repoforge.org/geoip/geoip-devel-1.4.6-1.el6.rf.i686.rpm

wget http://sourceforge.net/projects/ntop/files/ntop/Stable/ntop-4.1.0.tar.gz/download
tar -zxvf ntop-4.1.0.tar.gz
cd ntop-4.1.0
./autogen.sh
make
make install

#make install-selinux-policy
#disable SELinux now
/usr/sbin/setenforce 0

useradd -M -s /sbin/nologin -r ntop
chown -R ntop:root /usr/local/var/ntop/
chown -R ntop:ntop /usr/local/share/ntop/
ntop -A
/usr/local/bin/ntop -d -L -u ntop -P /usr/local/var/ntop --skip-version-check --use-syslog=daemon
# or
#/usr/local/bin/ntop -i "eth0" -d -L -u ntop -P /usr/local/var/ntop --skip-version-check --use-syslog=daemon
firefox http://localhost:3000/ &(安裝完成後的測試)
完成!!

設定開機自動啟動:
vi /etc/rc.local
加入這一行==>/usr/local/bin/ntop -i "eth0" -d -L -u ntop -P /usr/local/var/ntop --skip-version-check --use-syslog=daemon


小弟是參考此網站:

[研究] NTOP 4.1.0 安裝(tar.gz)(CentOS 6.2 x86)


ESXi Server設定Mirror Port

因Ntop是架設在Esxi Server上所以除了Switch上設定完後也要在ESXi上設定
ESXi為5.0版本,使用vSphere Client 5.0來改

以下為設定步驟:

Span Port Virtual Switch Configuration
  • From the vSphere client stand on one of the ESX servers
  • Go to Configuration > Networking > Add Networking  > Virtual Machine
  • Choose the physical NIC which is dedicated to the Ntop and is connected to the Hub
  • We have renamed the name of the virtual port group into: VoipCapture
             
  • Go to the Virtual Switch Properties
  • Go to vSwitch > Edit
             
  • Move to Security tab and change the Promiscuous Mode into : Accept
            
  • Go back to vSwitch > Edit ,stand on the VoipCapture virtual port Group > Edit
  • Move to Security tab and mark Promiscuous Mode : Accept
            
  • Move to Traffic Shaping tab and mark Status : Disabled
            
  • Move to NIC Teaming tab and mark Network Failover Detection: Link Status Only
              
這樣就設定完成啦!!
不過前提下一定要再多安裝一片1Gbps的網卡連接Span Port的Switch上~
粉簡單八~~


完成後就要移駕至NTOP安裝設定.....
小弟規劃使用CentOS 6.2平台來安裝NTOP

3COM 4500G Port Mirror設定

因學校網路流量有時異常,需要流向監控來查明問題
以下為3COM 4500G Switch設定配置

- Configure GigabitEthernet 1/0/1  as mirroring source ports.

- Configure GigabitEthernet 1/0/15 as the mirroring destination port.

Configuration procedure
Configure Switch C:
# Create a local mirroring group.(一定要設)
================================================================
system-view
<4500G> mirroring-group 1 local

# Configure the source ports and destination port for the local mirroring group.
<4500G> mirroring-group 1 mirroring-port GigabitEthernet 1/0/1
<4500G> mirroring-group 1 monitor-port GigabitEthernet 1/0/15

# Display configuration information about local mirroring group 1.
<4500G>display mirroring-group 1
mirroring-group 1:
    type: local
    status: active
    mirroring port:
        GigabitEthernet1/0/1  both
    monitor port: GigabitEthernet1/0/15
===============================================================


設定完成後較疑惑的是竟然還可以Get DHCP IP,可能3COM把Port Mirror當作HUB功能!?
另外VLAN也全部都撈到了!!

2012年6月8日 星期五

更換馬桶進水器

家裡的馬桶老是沖不乾淨
於是檢查研究後,發現是進水器問題,此馬桶為特殊進水方式
有兩道進水管路,一個是到儲水桶另一個是桶身
但是此馬桶原先進水器只到儲水桶,當馬桶沖水後只將水流進儲水桶沒管路到桶身
所以沒足夠水流沖乾淨
為此只好自己動手整修,發揮DIY精神囉!

在露天某位專業賣家買的~1000元含7-11取貨付款....



馬桶沖不乾淨時就會水位偏低,因為沒足夠水量.....



 原來的進水器,好陽春....



 新的進水器,這是此馬桶型號專用(C300),不知為何差這麼多....
拍賣上很多賣副廠的,價格差很多~還是覺得原廠比較安心拉



先把進水閥關緊,避免拆進水器時噴出自來水



把舊的進水器拆掉了



新的進水器進水口先纏繞防水膠布,防止漏水



安裝好啦~也順便細部調整出水量以達到省水節能
有注意看到嗎?多了一根管子連出去


 瞧~水變多啦,就是這個關鍵!在沖便便時能清的乾淨溜溜
回想之前常常遺留很討厭,很像酸辣湯哩



馬桶乾淨的倩影.....



MT15新增後方向燈

 因莫名交通事故而想讓後方車輛更清楚看到我車的警示燈光 事故對方稱說沒看到方向燈而超車擦撞 而這台車也因為前車主有改裝過方向燈,隱藏在後燈殼裡 也應該是這樣後方看到方向燈的角度會很小 於是構想在顯眼的位置再增加後方向燈 上淘寶找了很多款,翻了近百頁才找到合適的燈 買了這個想安裝在...