[Ntop] Re: Compile Problems - Win32 using MinGW
jacengel
jacengel at home.nl
Thu Oct 27 16:45:33 CEST 2005
Skipped content of type multipart/alternative-------------- next part --------------
This document was written By Georger and reviewed by Jac Engel.
FOREWORD
--------
If you want a high-quality, official, polished, supported binary release
for Windows, please visit http://shop.ntop.org. There you can purchase ntop
for Win32, and several other ntop-related products.
This distribution does NOT include binaries. It includes instructions on
how to compile ntop yourself. If you want a high-quality, official,
polished, supported binary release for Windows, please visit
http://shop.ntop.org. There you can purchase ntop for Win32, and several
other ntop-related products.
Please DO NOT redistribute the binaries you compile. Please DO contribute
your patches back to the project.
INSTRUCTIONS
------------
1) Get the OpenSSL 0.9.8 binary distribution from http://www.slproweb.com/products/Win32OpenSSL.html and install it
in c:\OpenSSL.
2) Go to http://www.winpcap.org/install/default.htm and download BOTH the
WinPcap 3.1 Installer for Windows 95/98/ME/NT4/2000/XP/2003/Vista AND
the Developer's pack WpdPack_3_1.zip . Install the binaries. If you have a previous
version installed, it will be uninstalled automatically.
3) Get MSYS-1.0.9.exe and MinGW-3.1.0-1.exe from http://www.mingw.org.
Install first MINGW-3.1.0-1.exe in the default folder.
Install then MSYS-1.0.9.exe in the default folder and answer at postinstall with the following:
Do you have MinGW installed? [yn ] y
Please answer the following in the form of c:/foo/bar.
Where is your MinGW installation? c:/mingw
>>>>>>>>>>
Creating /etc/fstab with mingw mount bindings.
Normalizing your MSYS environment.
You have script /bin/awk
You have script /bin/cmd
You have script /bin/echo
You have script /bin/egrep
You have script /bin/ex
You have script /bin/fgrep
You have script /bin/printf
You have script /bin/pwd
You have script /bin/rvi
You have script /bin/rview
You have script /bin/rvim
You have script /bin/vi
You have script /bin/view
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.....
<<<<<<<<<<<<<<<
( this will automatically change C:\msys\1.0\etc\fstab so that c:/mingw is mounted on /mingw )
4) Append c:\mingw\bin and c:\msys\1.0\bin a to your PATH
(in Computer properties - Advanced - environment variables),
new PATH will be set after reboot, if you don't want to reboot excute following in dos box :
set path=%PATH%;C:\Mingw\bin;c:\msys\1.0\bin
5) Get ntop-3.2.zip from
http://savefile.com/projects.php?pid=420840
Unzip ntop-3.2.zip to C:\MinGW\ntop3.2
Your C:\MinGW\ntop3.2 should contain the following subfolders:
gdbm-1.8.3, graphics, winpcap-3.1, ntop and openssl-0.9.8.
6) Get ntoponmingw-libs.zip from
http://savefile.com/projects.php?pid=420840 and unzip it in
C:\MinGW\ntop3.2
7) Unzip WpdPack_3_1.zip in C:\MinGW\ntop3.2 and rename the WpdPack_3_1
folder to winpcap-3.1
8) Create folder C:\MinGW\include\openssl and copy all files in C:\MinGW\ntop3.2\openssl-0.9.8\include to it.
Create folder openssl-0.9.8 under C:\MinGW\ntop3.2
Copy libeay32.a and ssleay32.a from C:\OpenSSL\lib\MinGW to C:\MinGW\ntop3.2\openssl-0.9.8.
9) Your folder tree should look like this (only most important folders
shown):
c:\mingw
|
+--include
| |
| +--openssl
|
+--ntop3.2
|
+--gdbm-1.8.3
| |
| +--bin
| |
| +--include
| |
| +--lib
|
+--graphics
| |
| +--gd-1.8.3
| | |
| | +--libpng-1.2.4
| |
| +--zlib-1.2.3
|
+--winpcap-3.1
| |
| +--Include
| |
| +--Lib
|
+--ntop
| |
| +--configureextra
| |
| +--docs
| |
| +--html
| |
| +--installer
| |
| +--myrrd
| |
| +--NetFlow
| |
| +--packages
| |
| +--plugins
| |
| +--utils
| |
| +--www
|
+--openssl-0.9.8
11) Run MSYS (click on desktop icon MSYS) and run the following commands:
cd /mingw/ntop3.2/ntop/
make -f Makefile.MingW depend
make -f Makefile.MingW
It should compile fine.
14) Open a command prompt goto cd /mingw/ntop3.2/ntop/
and try
ntop /h
It should display the help. Then try
ntop /c
and it should run in console mode.
Remark: the default user = admin with pwd = admin
You can change this password goto:
Ntop webpage , select from menu Admin - Configure - Web Users
you see one user admin click on modify and enter new password.
You can also add new users and you can also define the permissions (Restricted ntop URLs)
for that user in "Show Url's".
CONCLUSION
----------
>From now on you're on your own. If you need help, browse the ntop mailing
list archives at http://www.ntop.org/needHelp.html. Regards,
Georger
Added by Jac
------------
While Georger say :Please DO NOT redistribute the binaries you compile.
I distribute it for my own purpose to put the packaged file on my laptop
so you don't need to install all the development stuff !!
8) Package ntop and the dependent files
- Create directory e.g. C:\ntop , copy ntop.exe from \mingw\ntop3.1\ntop\ and the html
subdirectory hierarchy.
- Copy from \mingw\ntop3.2\ntop\*.txt files to c:\ntop
(specialMAC.txt,oui.txt,AS-list.txt)
Copy from \mingw\ntop3.2\ntop\ the following files to c:\ntop
services, p2c.opt.table and etter.finger.os,ntop-cert.pem
- Ntop dependent files
- packet.dll,wpcap.dll and for SSL libeay32.dll, ssleay32.dll.
( packet.dll,wpcap.dll, exist in C:\WINNT\system32 after install of WinPcap3.1.exe
this dir is already in your PATH variable)
- copy from C:\WINNT\system32 OpenSSL dll's libeay32.dll, ssleay32.dll to c:\ntop
- In c:\ntop create shortcut to ntop.exe and edit properties of this shortcut and change
target to :
C:\ntop\ntop.exe /c
Also you can add optional parameters like : C:\ntop\ntop.exe /c -p protocol.list
Use this shortcut to start NTOP
- If you want to package Ntop for distribution :
Copy libeay32.dll, ssleay32.dll from C:\WIndows\system32 to c:\ntop
Copy the above downloaded file WinPcap_3_1.exe to c:\ntop\winpcap and
ZIP the whole C:\ntop directory in a zip file (include PATH info !)
You can distribute this ZIP file now with instructions to unzip this file in C:\
and that they need to install the file c:\ntop\winpcap\WinPcap_3_1.exe
and that ntop can be started with "Shortcut of Ntop.exe"
copy c:\windows\system32\packet.dll to c:\ntontop3.2/ntopp\packet
Why this latest is required I don't know, otherwise error cannot find dynamic library packet .....
Regards,
Jac
More information about the Ntop
mailing list