Koozali.org: home of the SME Server

[ANNOUNCE] NTOP 3.2 howto for SME7

egerards

[ANNOUNCE] NTOP 3.2 howto for SME7
« on: August 16, 2006, 11:00:00 PM »
Some weeks ago I upgraded my server to SME7 so it was about time to upgrade the NTOP howto.

Those who do not know ntop: take a look at http://www.ntop.org/overview.html.

There we go:

- Go to your server manager --> 'Software installer' --> 'Change software installer settings' and enable the CentOS software repositories
- Open a command line console and enter following commands:
- yum install gcc
- yum install gcc-c++
- yum install zlib-devel
- yum install libpng-devel
- yum install gdbm-devel
- if not yet installed download rrdtool-1.0.50-1.2.el4.rf.rpm (for example here and install it (rpm -Uvh rrdtool-1.0.50-1.2.el4.rf.rpm)
- download the GD library from http://www.boutell.com/gd/
- tar xvzf gd-2.0.33.tar.gz ; cd gd-2.0.33 ; ./configure --prefix=/usr && make && make install
- download ntop 3.2 from http://prdownloads.sourceforge.net/ntop/ntop-3.2.tgz?download
- tar xvzf ntop-3.2.tgz ; cd ntop-3.2 ; ./configure && make && make install
- cd /etc/init.d ; wget http://gerards.ws/sme/ntop/ntop ; chmod 755 ntop
- cd /etc ; wget http://gerards.ws/sme/ntop/ntop.conf
- Start ntop during system boot: ln -s /etc/rc.d/init.d/ntop /etc/rc.d/rc7.d/S88ntop
- mkdir /var/ntop
- Set admin password: ntop --db-file-path /var/ntop -A
- Start ntop: /etc/init.d/ntop start
- If you no longer need them, disable the CentOS software repositories.

And you're done! Access ntop at http://YOUR_SERVER:3000

If you would like to have ssl support (access ntop via https), you should also install openssl-devel before compiling ntop. Also enable it in /etc/ntop.conf .
If you would like to be able to access ntop from the outside of your local network, you need to open port 3000:
- config set ntop service access public status enabled TCPPort 3000
- signal-event remoteaccess-update

That's it.

<EDIT: updated URL's>

jcoleman

[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #1 on: August 17, 2006, 05:03:46 AM »
egerards,

Installation fails on missing dependency: zlib

After enabling all Centos repos no difference.......

-jeff

egerards

[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #2 on: August 17, 2006, 07:00:21 AM »
Hmm, strange. I also tried the procedure on a clean install and that worked.

Quick workaround:

Code: [Select]
wget http://ftp.nluug.nl/os/Linux/distr/CentOS/4.3/os/i386/CentOS/RPMS/zlib-1.2.1.2-1.2.i386.rpm
wget http://ftp.nluug.nl/os/Linux/distr/CentOS/4.3/os/i386/CentOS/RPMS/zlib-devel-1.2.1.2-1.2.i386.rpm
rpm -Uvh zlib-*

jcoleman

[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #3 on: August 17, 2006, 07:37:41 AM »
Eric,

That got it.  Thanks!  This is pretty cool stuff.

-jeff

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #4 on: August 17, 2006, 06:33:49 PM »
Well, that seems very interesting. I'll try to pakage it as an rpm if a got time because installing dev tools on production server isn't recommended. Thanks for the howto
C'est la fin du monde !!! :lol:

Offline mdo

  • *
  • 355
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #5 on: August 17, 2006, 09:19:19 PM »
There is already available an ntop rpm for RHEL 4.3 which installed here easily on a test system and seems to work fine.
MIchael
...

Offline brick

  • ****
  • 78
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #6 on: August 17, 2006, 11:44:13 PM »
Where Michael?

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #7 on: August 18, 2006, 12:19:55 AM »
brick

http://www.ntop.org/download.html

About half way down

[Edit] here is the link ... http://rpm.pbone.net/index.php3/stat/4/idpl/2771125/com/ntop-3.2-1.el4.rf.i386.rpm.html


egerards

How do I uninstall this ver so I can start again ... I think I did something wrong or missed a step.

I'm getting a connection refused when trying to access the web interface.

I has it a guess it's user access related ... I'm guessing that you also have to set a user etc for ntop?

Regards,

Tib

egerards

[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #8 on: August 18, 2006, 01:27:02 AM »
About the already downloadable rpm file: I found this file too and tried to install it. I got complaints about the GD library. Tried to install the GD rpm --> libx11 required... Installed GD manually. Still had to force installation of the rpm (--nodeps parm) and eventually it still didn't work 100% correctly. So that's why I decided to compile it myself.

Quote from: "Tib"
egerards

How do I uninstall this ver so I can start again ... I think I did something wrong or missed a step.

I'm getting a connection refused when trying to access the web interface.

I has it a guess it's user access related ... I'm guessing that you also have to set a user etc for ntop?


If you tried the rpm (not sure if you mean that): rpm -e ntop
If you tried to follow my howto and want to start over: simply restart without reinstalling the yum installs. If you really want to remove all related files: they can be found at /usr/local (find /usr/local/ -name ntop*).

I didn't setup a specific user for ntop, I'm simply running it as user root. Previously when I installed it under SME6.X, I tried to run ntop with a non priviledged account, however ntop didn't gather any information from my network; the stats stayed blanc. Feel free to try a non root user if you like.

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #9 on: August 18, 2006, 01:48:38 AM »
egerards

I'll delete the dir then and re install your ver.

I must have missed one small step somewhere.

Also after the install do you have to do anymore first off setups etc ... looking at the docs 1strun.txt has some setup stuff in it.

I'll have to re-install all the devel rpms as I uninstalled them after setup.


Thanks for the help.

Regards,

Tib

Offline brick

  • ****
  • 78
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #10 on: August 18, 2006, 02:13:09 AM »
Thanks Tib,
I too couldn't access the page, but:
I was running in server-only mode, so I had to edit the /etc/ntop.conf to reflect my only eth0 interface.

Regards,

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #11 on: August 18, 2006, 02:46:07 AM »
brick

Well I feel like a dill :hammer:

Thats all I had to do ... my test server is in server only mode :roll:

Didn't even look at that setting ... even though I had the file open a few times.

Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #12 on: August 18, 2006, 03:37:43 AM »
Very nice tool

I have one error though ...

Local Network Traffic Map
ERROR
Missing 'dot' tool (expected /usr/local/bin/dot). Please set its path (key dot.path) here.

Under IP ... then local.

Not sure where the dot tool is on my system or if it's there at all.

Anyone else getting this or is it just me.


Regards,

Tib

Offline Tib

  • *
  • 571
  • +0/-0
    • http://www.tibors.net
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #13 on: August 18, 2006, 04:02:34 AM »
OK ... I found out if you want dot to work you have to install graphviz from here ---> http://www.graphviz.org/Download..php

and possibly this as well ---> http://www.graphviz.org/pub/graphviz/ARCHIVE/webfonts-1.0-5.noarch.rpm

The site has the names of the dependancies required as well if required.

http://www.graphviz.org/Download_source.php

forum links http://www.gossamer-threads.com/lists/ntop/misc/18482

and

http://listgateway.unipi.it/pipermail/ntop/2005-June/010549.html

Might try this tomorrow ... running out of time today.

Regards,

Tib

Offline mdo

  • *
  • 355
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #14 on: August 18, 2006, 10:22:42 AM »
Quote
found this file too and tried to install it. I got complaints about the GD library. Tried to install the GD rpm --> libx11 required


Eric,

I recommend to use yum for rpm installations which should help to find and to resolve dependencies (and keeps a log which rpm was when installed) eg:

yum localinstall ntopxxxxx.rpm --enablerepo=*

This allows all repositories to be searched for dependent rpms.
Michael
...

egerards

[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #15 on: August 18, 2006, 11:26:09 AM »
Quote from: "mdo"
Eric,

I recommend to use yum for rpm installations which should help to find and to resolve dependencies (and keeps a log which rpm was when installed) eg:

yum localinstall ntopxxxxx.rpm --enablerepo=*

This allows all repositories to be searched for dependent rpms.
Michael


Thanks for the tip. This could be a time saver in case of a lot of dependencies.

Though if you have the time to spend, compiling the whole bunch yourself can be a satisfactory and educational activity....  ;-)

Janm

[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #16 on: August 19, 2006, 12:44:50 PM »
For Centos

wget http://heanet.dl.sourceforge.net/sourceforge/ntop/ntop-3.2-0.centos4.i386.rpm


yum localinstall ntop-3.2-0.centos4.i386.rpm --enablerepo=*

just tried on 7.0 final to

Fantastic piece of Software i am using it to test a sme server v.6.0.1-02Custom for the moment
janm
ps: Thanks for all the info from all here

Offline jeroenm

  • *
  • 18
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #17 on: February 15, 2007, 01:03:15 AM »
Quote from: "Janm"
For Centos

wget http://heanet.dl.sourceforge.net/sourceforge/ntop/ntop-3.2-0.centos4.i386.rpm


yum localinstall ntop-3.2-0.centos4.i386.rpm --enablerepo=*

...


Works like a charm, just installed it on 7.1
...

Offline okepc

  • ****
  • 118
  • +0/-0
    • http://www.okepc.nl
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #18 on: February 15, 2007, 09:52:27 AM »
Working like a charm here also!
Also with webdot and graphiz for the graphical network overview and rrd stats.
Installed the centos rpm.

Dirk

Offline eenn62

  • 4
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #19 on: February 15, 2007, 03:49:59 PM »
it's not working for me

I think the path by the mirrors is changed or something

Here is my log

thanks in advanced



[root@server1 ~]# yum localinstall ntop-3.2-0.centos4.i386.rpm --enablerepo=*
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Loading "fastestmirror" plugin
Loading "smeserver" plugin
Setting up Local Package Process
Examining ntop-3.2-0.centos4.i386.rpm: ntop - 3.2-0.centos4.i386
Marking ntop-3.2-0.centos4.i386.rpm to be installed
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package ntop.i386 0:3.2-0.centos4 set to be updated
--> Running transaction check
Setting up repositories
smetest                   100% |=========================|  951 B    00:00
smedev                    100% |=========================|  951 B    00:00
http://mirror.centos.org/centos/4/testing/i386/repodata/repomd.xml: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
Cannot open/read repomd.xml file for repository: testing
failure: repodata/repomd.xml from testing: [Errno 256] No more mirrors to try.
Error: failure: repodata/repomd.xml from testing: [Errno 256] No more mirrors to try.
================================================================
No new rpms were installed. No additional commands are required.
================================================================
[root@server1 ~]#

Offline sonoracomm

  • *
  • 208
  • +0/-0
    • http://www.sonoracomm.com
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #20 on: March 01, 2007, 10:57:07 PM »
I recently did this howto for internal use.  I didn't know there was another or that anyone else was interested...

http://www.sonoracomm.com/index.php?option=com_content&task=view&id=145

Please let me know of any errors or omissions.

G

Offline haymann

  • *
  • 212
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #21 on: March 05, 2007, 06:19:19 PM »
I was installing the excellent OpenVPN bridge from the SME Firewall-Services site and noticed that they have ntop rpms in the downloads section of the site that look pretty recent. I didn't see a how-to, so I don't know if they are ready to be used or not though...

I am eager to try sonoracomm's how to. I am just wondering if I can use wget to use the rpms from the SME Firewall-Services folks so I don't have to add another yum repo (even temporarily...).
Ryan

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #22 on: March 05, 2007, 06:54:55 PM »
I put the rpms on our web site because I needed to install it for one of our customers. I wrote a small how-to, you can find it here:

http://sme.firewall-services.com/spip.php?article41
C'est la fin du monde !!! :lol:

Offline haymann

  • *
  • 212
  • +0/-0
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #23 on: March 05, 2007, 08:32:52 PM »
Quote from: "VIP-ire"
I put the rpms on our web site because I needed to install it for one of our customers. I wrote a small how-to, you can find it here:

http://sme.firewall-services.com/spip.php?article41
Excellent! Thanks! There seems to be quite a difference in your how-to and sonoracomm's, is there a way to tell if there is any difference in functionality?

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #24 on: March 06, 2007, 11:30:49 AM »
Well, I'm not sure, I just wrote mine quickly a few day before sonoracomm published its own. There're just some little differences, the main one is that by default my how-to configure ntop server to wait for https request instead of http, but it's very easy to configure. I think you can use one or the other without any big difference.
C'est la fin du monde !!! :lol:

Offline sonoracomm

  • *
  • 208
  • +0/-0
    • http://www.sonoracomm.com
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #25 on: March 06, 2007, 04:51:25 PM »
I don't remember, exactly, but I think I had trouble getting the SSL rewrite working.  I gave up  :oops: and decided to just use SSH port forwarding to access the data.  I was hoping to have the ntop monitor available via the standard SSL URL with a password...

I'll be checking out your howto!   :wink:

G

p.s.  I agree about the resource usage.  I only run ntop when I need it...

Offline BartManInNZ

  • **
  • 31
  • +0/-0
    • http://www.bart.geek.nz/
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #26 on: March 16, 2007, 03:26:19 AM »
Are there any know issues with this contrib installed at the same time as the sme7admin contrib?

Since installing ntop I find I have no stats in sme7admin anymore, this is on a freshly installed server.

TIA,
Bart

Offline sonoracomm

  • *
  • 208
  • +0/-0
    • http://www.sonoracomm.com
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #27 on: March 16, 2007, 04:29:12 AM »
Not that I know of, but if you have SME7ADMIN installed, you probably don't need NTOP.

I decided not to reinstall SME7ADMIN on my particular server and to install NTOP only because it is lighter-weight and has sufficient functionality for my needs.  I think SME7ADMIN is more comprehensive.

The other thing I like about NTOP is that I can only turn it on when I need it.  I don't know if that's possible with SME&ADMIN.

G

Offline Daniel B.

  • *
  • 1,700
  • +0/-0
    • Firewall Services, la sécurité des réseaux
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #28 on: March 16, 2007, 10:05:47 AM »
No, there's no problem having NTOP and sme7admin on the same server. I have two servers running both. Just check that sme7admind is running:
/etc/init.d/sme7admind restart
C'est la fin du monde !!! :lol:

Offline BartManInNZ

  • **
  • 31
  • +0/-0
    • http://www.bart.geek.nz/
[ANNOUNCE] NTOP 3.2 howto for SME7
« Reply #29 on: March 18, 2007, 09:46:45 PM »
It looks as though my time was set incorrectly when I installed sme7admin and when the time was corrected via NTP this caused issues with rrdtool and the timestamps. It is now all working as the time ahs 'caught up'

Thanks for your help,

Bart