<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[运维进行时]]></title> 
<link>https://blog.liuts.com/index.php</link> 
<description><![CDATA[互联网运维与架构]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[运维进行时]]></copyright>
<item>
<link>https://blog.liuts.com/post//</link>
<title><![CDATA[部署ntop平台]]></title> 
<author>root &lt;admin@yourname.com&gt;</author>
<category><![CDATA[Linux]]></category>
<pubDate>Mon, 14 Sep 2009 16:05:52 +0000</pubDate> 
<guid>https://blog.liuts.com/post//</guid> 
<description>
<![CDATA[ 
	<strong>下载软件包</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>wget http://oss.oetiker.ch/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz<br/>wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.3.5.tar.gz<br/>wget http://oss.oetiker.ch/rrdtool/pub/libs/libpng-1.2.18.tar.gz<br/></div></div><br/><strong>安装</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>tar -zxvf libart_lgpl-2.3.17.tar.gz<br/>cd libart_lgpl-2.3.17<br/>./configure<br/>make;make install<br/>cd<br/>tar -zxvf freetype-2.3.5.tar.gz<br/>cd freetype-2.3.5<br/>./configure<br/>make ;make install<br/>cd<br/>tar -zxvf libpng-1.2.18.tar.gz<br/>libpng-1.2.18<br/>./configure<br/>make ;make install<br/><br/>cp -r libart-2.0/ /usr/include/libart-2.0/<br/>cp -r freetype2/ /usr/include/freetype2/<br/>cp -r libpng12/ /usr/include/libpng12/<br/><br/>wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.27.tar.gz<br/>tar -zxvf rrdtool-1.2.27.tar.gz<br/>cd rrdtool-1.2.27<br/>ls<br/>./configure --prefix=/usr/local/rrdtool<br/>make && make install<br/></div></div><br/><strong>安装libevent</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>wget http://monkey.org/~provos/libevent-1.4.3-stable.tar.gz<br/>tar -zxvf libevent-1.4.3-stable.tar.gz<br/>cd libevent-1.4.3-stable<br/>./configure && make && make install<br/></div></div><br/><strong>安装ntop</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>tar -zxvf ntop-3.3.10.tar.gz<br/>cd ntop-3.3.10<br/>./autogen.sh<br/></div></div><br/><br/><strong>问题1</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>configure: error: cannot find macro directory `m4'<br/>解决1cd /home/root/source/ntop-3.3.10<br/>mkdir m4<br/></div></div><br/><br/><strong>问题2</strong><br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>/usr/bin/ld: /usr/local/lib/libz.a(compress.o): relocation R_X86_64_32 against `a local symbol' can not be used when<br/>making a shared object; recompile with -fPIC<br/>/usr/local/lib/libz.a: could not read symbols: Bad value<br/>collect2: ld returned 1 exit status<br/>make[2]: *** [libgd.la] 错误 1<br/>make[2]: Leaving directory `/usr/local/src/ntop'<br/>make[1]: *** [all-recursive] 错误 1<br/>make[1]: Leaving directory `/usr/local/src/ntop'<br/>make: *** [all] 错误 2<br/><br/>解决：<br/>wget http://www.imagemagick.org/download/delegates/zlib-1.2.3.tar.gz<br/>tar -zxvf zlib-1.2.3.tar.gz<br/>cd zlib-1.2.3<br/>./configure<br/><br/>vi Makefile<br/>找到 CFLAGS=-O3 -DUSE_MMAP<br/>在后面加入-fPIC，即变成CFLAGS=-O3 -DUSE_MMAP -fPIC<br/>接下面步骤<br/>make<br/>make install<br/></div></div><br/><br/>继续安装ntop(此时已生成了configure):<br/>./configure --with-rrd-home=/usr/local/rrdtool<br/>make<br/>make install<br/><br/>配置，启动ntop<br/>useradd ntop //新建ntop用户<br/>mkdir -p /var/www/html/ntop //建立ntop存放db文件夹，此路径可更改<br/>chown -R ntop:ntop /var/www/html/ntop<br/>cp /ntop-3.3.9/packages/RedHat/ntop.conf.sample /etc/ntop.conf<br/>ntop -A //设置ntop管理员密码<br/>ntop -P /var/www/html/ntop -u ntop //启动ntop，如无上一部，第一次运行是也会要求设置ntop管理员密码<br/>[root@rhel5u3 ~]#echo "/usr/local/bin/ntop -d -u ntop -P /var/www/html/ntop/ " >> /etc/rc.local //开机自动启动ntop<br/>浏览器打开http://IP:3000,就可以看到ntop的流量统计的网页<br/>PS：默认端口为3000,如果需要修改端口，启动ntop时试用-w参数<br/>如 ntop -P /var/www/html/ntop -u ntop -w 4000<br/><br/>效果图：<br/><a href="http://linux.softpedia.com/screenshots/ntop_1.jpg" target="_blank"><img src="http://linux.softpedia.com/screenshots/ntop_1.jpg" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>Tags - <a href="https://blog.liuts.com/tags/ntop/" rel="tag">ntop</a>
]]>
</description>
</item><item>
<link>https://blog.liuts.com/post//#blogcomment</link>
<title><![CDATA[[评论] 部署ntop平台]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://blog.liuts.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>