################################ NTOP¸ð´ÏÅ͸µTool¼³Ä¡ Æ®·¡ÇÈ ¸ð´ÏÅ͸µ 2007.11.15 ¸Å´º¾ó ·ù±¤¼· ################################ ntopÀ» ¼³Ä¡Çϱâ Àü¿¡ ¼±ÇàµÇ¾î¾ß ÇÒ ÅøÁß¿¡ RRDToolÀÌ´Ù. - RRDTool ¼³Ä¡ System Monitoring [root@localhost ntop]# BUILD_DIR=/tmp/rrdbuild [root@localhost ntop]# INSTALL_DIR=/usr/local/rrdtool [root@localhost ntop]# mkdir -p $BUILD_DIR [root@localhost ntop]# cd $BUILD_DIR [root@localhost ntop]# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.2.25.tar.gz [root@localhost ntop]# tar zxf rrdtool-1.2.19.tar.gz [root@localhost ntop]# cd $BUILD_DIR/rrdtool-1.2.19 [root@localhost ntop]# ./configure --prefix=$INSTALL_DIR --disable-python --disable-tcl [root@localhost ntop]# make clean [root@localhost ntop]# make [root@localhost ntop]# make install RRDToolÀ» ¼³Ä¡ÇÏ´Ù ¸î¸î ÆÐÅ°Áö°¡ ¿¡·¯³¯°æ¿ì ¹Ø¿¡¼­ °ñ¶ó¼­ ¼³Ä¡ÇÑ´Ù. - Building zlib [root@localhost ntop]# cd $BUILD_DIR [root@localhost ntop]# wget http://oss.oetiker.ch/rrdtool/pub/libs/zlib-1.2.3.tar.gz [root@localhost ntop]# tar zxf zlib-1.2.3.tar.gz [root@localhost ntop]# cd zlib-1.2.3 [root@localhost ntop]# env CFLAGS="-O3 -fPIC" ./configure --prefix=$BUILD_DIR/lb && make && make install - Building libpng [root@localhost ntop]# cd $BUILD_DIR [root@localhost ntop]# wget http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/libs/libpng-1.2.10.tar.gz [root@localhost ntop]# tar zxvf libpng-1.2.10.tar.gz [root@localhost ntop]# cd libpng-1.2.10 [root@localhost ntop]# env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS="-O3 -fPIC" \ ./configure --disable-shared --prefix=$BUILD_DIR/lb && make && make install - Building freetype [root@localhost ntop]# cd $BUILD_DIR [root@localhost ntop]# wget http://oss.oetiker.ch/rrdtool/pub/libs/freetype-2.1.10.tar.bz2 [root@localhost ntop]# tar jxvf freetype-2.1.10.tar.bz2 [root@localhost ntop]# cd freetype-2.1.10 [root@localhost ntop]# env CPPFLAGS="-I$BUILD_DIR/lb/include" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS="-O3 -fPIC" \ ./configure --disable-shared --prefix=$BUILD_DIR/lb && make && make install - Building libart_lgpl [root@localhost ntop]# cd $BUILD_DIR [root@localhost ntop]# wget http://oss.oetiker.ch/rrdtool/pub/libs/libart_lgpl-2.3.17.tar.gz [root@localhost ntop]# tar zxvf libart_lgpl-2.3.17.tar.gz [root@localhost ntop]# cd libart_lgpl-2.3.17 [root@localhost ntop]# env CFLAGS="-O3 -fPIC" ./configure --disable-shared --prefix=$BUILD_DIR/lb && make && make install - Building libpcap ´Ù¿î·Îµå : http://sourceforge.net [root@localhost ntop]# cd $BUILD_DIR [root@localhost ntop]# tar zxvf libpcap-0.9.8.tar.tar [root@localhost ntop]# cd libpcap-0.9.8 [root@localhost ntop]# ./configure && make && make install ÀÌ È¯°æº¯¼öµéÀº ²À ½ÇÇàÇØÁÖÀÚ IR=-I$BUILD_DIR/lb/include CPPFLAGS="$IR $IR/libart-2.0 $IR/freetype2 $IR/libpng" LDFLAGS="-L$BUILD_DIR/lb/lib" CFLAGS=-O3 export CPPFLAGS LDFLAGS CFLAGS - ntop¼³Ä¡ ´Ù¿î·Îµå :http://sourceforge.net/project/downloading.php?group_id=17233&use_mirror=nchc&filename=ntop-3.3.tar.gz&49030191 [root@localhost ntop]# ./autogen.sh [root@localhost ntop]# ./configure --prefix=/usr/local/ntop [root@localhost ntop]# make [root@localhost ntop]# make install [root@localhost ntop]# cd /usr/local/ntop/bin/ [root@localhost ntop]# ./bin/ntop ntop startup - waiting for user response! Please enter the password for the admin user: Please enter the password again: [root@localhost ntop]# useradd ntop [root@localhost ntop]# chown -R ntop.ntop //usr/local/ntop/share/ntop [root@localhost ntop]# ./ntop -u ntop -w 81 -r 180 -i eth1 & -u : ntopÀ» ½ÇÇàÇÒ À¯Àú root·Î ÇÒ°æ¿ì º¸¾È°æ°í¿Í ÇÔ²² ½ÇÇàÀÌ ¾ÈµË´Ï´Ù. -w : http ÇÁ·ÎÅäÄÝÀÇ Æ÷Æ®¹øÈ£ -W : ssl ·Î ¶ç¿ï Æ÷Æ®¹øÈ£ -P : ntop ÀÌ ½ÃÀ۵ɶ§ »ý¼ºµÇ´Â db È­ÀÏÀÌ Á¸ÀçÇÒ µð·ºÅ丮 ÀÔ´Ï´Ù..²À ÀÌ ¿É¼ÇÀ» Áà¾ß ÇÕ´Ï´Ù. -r : refresh ½Ã°£ÀÔ´Ï´Ù. default ´Â 3Ãʳ׿ä. -i : interface ÁöÁ¤ÀÔ´Ï´Ù. -m : ¸ð´ÏÅ͸µÇÒ ³×Æ®¿÷ ´ë¿ªÀÔ´Ï´Ù. start_ntop.sh ÀÛ¼º [root@localhost ntop]# /usr/local/ntop/bin/ntop -u ntop -w 3000 -P /usr/local/ntop -r 180 -i eth1 & stop_ntop.sh ÀÛ¼º [root@localhost ntop]# kill -9 `lsof | grep LISTEN | grep ntop | awk '{print $2}'` ½ºÅ©¸³Æ® ÀÛ¼ºÇؼ­ »ç¿ë ÇÏ½Ã¸é µË´Ï´Ù. NTOP ¿É¼Ç Âü°íÇϼ¼¿ä ++++++++++++++++++++ Usage: ntop [OPTION] Basic options: [-h | --help] Display this help and exit [-u | --user ] Userid/name to run ntop under (see man page) [-t | --trace-level ] Trace level [0-6] [-P | --db-file-path ] Path for ntop internal database files [-Q | --spool-file-path ] Path for ntop spool files [-w | --http-server ] Web server (http:) port (or address:port) to listen on [-W | --https-server ] Web server (https:) port (or address:port) to listen on Advanced options: [-4 | --ipv4] Use IPv4 connections [-6 | --ipv6] Use IPv6 connections [-a | --access-log-file ] File for ntop web server access log [-b | --disable-decoders] Disable protocol decoders [-c | --sticky-hosts] Idle hosts are not purged from memory [-d | --daemon] Run ntop in daemon mode [-e | --max-table-rows ] Maximum number of table rows to report [-f | --traffic-dump-file ] Traffic dump file (see tcpdump) [-g | --track-local-hosts] Track only local hosts [-i | --interface ] Interface name or names to monitor [-j | --create-other-packets] Create file ntop-other-pkts.XXX.pcap file [-l | --pcap-log ] Dump packets captured to a file (debug only!) [-m | --local-subnets ] Local subnetwork(s) (see man page) [-n | --numeric-ip-addresses] Numeric IP addresses - no DNS resolution [-o | --no-mac] ntop will trust just IP addresses (no MACs) [-p | --protocols ] List of IP protocols to monitor (see man page) [-q | --create-suspicious-packets] Create file ntop-suspicious-pkts.XXX.pcap file [-r | --refresh-time ] Refresh time in seconds, default is 120 [-s | --no-promiscuous] Disable promiscuous mode [-x ] Max num. hash entries ntop can handle (default 8192) [-z | --disable-sessions] Disable TCP session tracking [-A] Ask admin user password and exit