Compiling ntop on Windows - Part 2 September 14, 2006
Download MinGW-5.0.2 and run the installer
- From the install type dropdown menu - Select Minimal install
- In the box under the dropdown, check the g++ compiler and MinGW Make Options
- Install in the default folder (C:\MinGW)
Download MSYS-1.0.10 and run the installer
- Install in the default folder (C:\msys\1.0)
- When asked if you want to go through the post install configuration, answer yes
- When the question is asked: Do you have MinGW installed? [yn ] Answer y
- When the question is asked: Where is your MinGW installation? Answer c:/mingw
- You should see the following at the end of the configuration process:
Oh joy, you do not have c:/mingw/bin/make.exe. Keep it that way.
C:\msys\1.0\postinstall>pause
Press any key to continue.....
Download OpenSSL 0.9.8b binary distribution
- Install this at C:\OpenSSL
Download WinPcap 3.1 Installer for Windows 95/98/ME/NT4/2000/XP/2003/Vista and the Developers Pack
- Run the WinPcap 3.1 Auto Installer
Now update your path statement by Right Clicking on My Computer -> Properties
Go to the Advanced Tab and press the Environment Variables button
- Append c:\mingw\bin and c:\msys\1.0\bin to your PATH
Browse to the c:\MinGW folder and create a folder under it called ntop-3.2.2
Under C:\MinGW\ntop-3.2.2 create another folder called ntop
Download the ntop source
- Now unzip the contents of the Ntop zip file to C:\MinGW\ntop-3.2.2\ntop
Browse to the C:\MinGW\include folder and create a folder under it called openssl - then browse to the openssl folder you just created.
In a second explorer window, Browse to the C:\OpenSSL\include\openssl folder. Select all files in that folder and copy them to your original folder window, which should be at: C:\MinGW\include\openssl
Create folder openssl-0.9.8b under C:\MinGW\ntop-3.2.2. Copy libeay32.a and ssleay32.a from C:\OpenSSL\lib\MinGW to C:\MinGW\ntop-3.2.2\openssl-0.9.8b.
Unzip WpdPack_3_1.zip (WinPcap Developers pack) in C:\MinGW\ntop-3.2.2 and rename the WpdPack folder to winpcap-3.1.
Create folder mysql under C:\MinGW\include and copy all files in the C:\MinGW\ntop-3.2.2\mysql-5.0.24\include folder to it.
Your folder tree should look like this (only most important folders
shown):
c:\mingw
|
+--include
| |
| +--mysql
| |
| +--openssl
|
+--ntop-3.2.2
|
+--gdbm-1.8.3
|
+--graphics
| |
| +--gd-2.0.33
| | |
| | +--libpng-1.2.12
| |
| +--zlib-1.2.3
|
+--mysql-5.0.24
|
+--ntop
| |
| +--docs
|
+--openssl-0.9.8b
|
+--pcre-6.7
| |
| +--.libs
|
+--rrdtool-1.2.15
| |
| +--src
| |
| +--release
|
+--winpcap-3.1
|
+--Include
|
+--Lib
Run MSYS and type the following commands:
cd /mingw/ntop-3.2.2/ntop/
make -f Makefile.mingw depend (lots of warnings… don’t worry)
make -f Makefile.mingw (lots of warnings… don’t worry)
It should compile fine
Open a command prompt and CD to \mingw\ntop-3.2.2\ntop. Try
ntop /h
You might get the following error in a message box:
“ntop.exe- Unable to locate DLL. The dynamic link library packet could
not be found in the specified path.”
If this happens, run the command below:
copy %WINDIR%\system32\packet.dll packet
and run
ntop /h
again. It should display the help. Then try
ntop /c
and it should run in console mode.

Loading...
11 Responses to “Compiling ntop on Windows - Part 2”
Interesting! This will certainly help me, as I don’t have CiscoWorks, and I really don’t want to spend them money — yet — on Distributed Sniffer.
I need to get a feel for the traffic flowing on my WAN links. This will prove most useful, as my SNMP statistics won’t give me protocols or patterns.
How has this worked for you? Any quirks or issues that you have ran into?
Thanks for the post!
~~Aaron
Couple of suggestions/corrections:
1. This is no longer avaialble by the embedded link: http://www.slproweb.com/download/Win32OpenSSL-0_9_8c.exe
But this is:
http://www.slproweb.com/download/Win32OpenSSL-0_9_8d.exe
2. ntop source code zip file already contains the ntop-3.3.2/ntop directory structure so there is no need to create it
3. My directory sturucture looks like this instead of the one you posted:
C:\MinGW
|
—bin
|
—doc
| —mingw-runtime
| |
| —mingw32-make
|
—include
| —c
| |
| —ddk
| |
| —GL
| |
| —mysql
| |
| —openssl
| |
| —sys
|
—info
| —make.info
|
—lib
| —debug
| |
| —gcc
|
—libexec
| —gcc
|
—man
| —man1
| |
| —man7
|
—mingw32
| —bin
| |
| —lib
|
—ntop-3.2.2
—gdbm-1.8.3
|
—graphics
|
—mysql-5.0.24
|
—ntop
|
—openssl-0.9.8b
|
—pcre-6.7
|
—rrdtool-1.2.15
|
—winpcap-3.1
Thanks for putting it together! Worked great otherwise
oops..dont think taht dir structure came out quite right. anyway, it matches if you follow the instructions…
Very useful. Thanks very much for putting this together.
C:\MinGW\ntop-3.2.2\mysql-5.0.24\include doesn’t exist under your directions but you say to copy files from it.
ntop is in it and you also say to make openssl-0.9.8b
those are the only 2 folders
openssl actually has version level 0.9.8.e
ntop 3.3 is out now.
What is to modify for running under mingw32/msys ?
This proccess does not work with ntop 3.3
Cheers,
works great
Can’t get it to work with nTop 3.3
Thanks! Works great, tested on NTop 3.2.2
Does anyone has ntop 3.3 source code? I mean in zip file. I have difficulty to download it from ntop.org