ntopng/doc/README.compilation
2020-04-08 15:19:09 +02:00

95 lines
4 KiB
Text

Prerequisites for Compilation
-----------------------------
Prerequisites
- glib2
- GNU autotools/libtool
- libmaxminddb
- geoipupdate
- libpcap or PF_RING (optional but recommended)
- redis (redis server) 2.2 or newer
- wget (for 'make geoip')
- libxml2-dev
- libglib2.0-dev
- libsqlite3-dev
- libcurl-dev
- libmysqlclient-dev
- uglify-es
On Ubuntu/Debian
- apt-get install build-essential git bison flex libxml2-dev libpcap-dev libtool libtool-bin rrdtool librrd-dev autoconf pkg-config automake autogen redis-server wget libsqlite3-dev libhiredis-dev libmaxminddb-dev libcurl4-openssl-dev libpango1.0-dev libcairo2-dev libnetfilter-queue-dev zlib1g-dev libssl-dev libcap-dev libnetfilter-conntrack-dev libreadline-dev libjson-c-dev libldap2-dev geoipupdate
On Debian 9/10 you need to do add the `contrib` component to /etc/apt/sources.list entries, then
- apt-get install libpng-dev libzmq5-dev default-libmysqlclient-dev geoipupdate
elsewhere
- apt-get install libmysqlclient-dev libzmq3-dev
On Ubuntu16/18 you also need to do "apt-get install libtool-bin"
You can decide to use MariaDB (instead of MySQL) do "apt-get install libmariadb-client-lgpl-dev" instead.
On Debian/Ubuntu if you plan to build packages you should also install
- apt-get install debhelper dpkg-sig dkms
On Centos8
- dnf group install "Development Tools"
- dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
- Set "enabled=1" in file /etc/yum.repos.d/CentOS-PowerTools.repo
- yum install http://rpms.remirepo.net/enterprise/remi-release-8.rpm
- yum config-manager --set-enabled remi
- yum clean all
- yum update
- yum install openldap-devel libpcap-devel openssl-devel libcurl-devel libmaxminddb-devel sqlite-devel mysql-devel radcli-devel librdkafka-devel libcap-devel zeromq-devel rrdtool-devel json-c-devel expect geoipupdate
- Then list the streams which provide redis (dnf module list redis) and install it. For example, to install it from stream 5 run: sudo dnf module install redis:5
- yum install hiredis-devel
On Fedora 30/31/32:
- dnf install libtool m4
- dnf install autoconf automake
- dnf group install "Development Tools"
- dnf install libpcap-devel openssl-devel libcurl-devel libmaxminddb-devel sqlite-devel mariadb-devel radcli-devel librdkafka-devel libcap-devel zeromq-devel rrdtool-devel json-c-devel expect
- dnf install redis
On (Older) Fedora/CentOS 6-7
- yum groupinstall "Development tools"
- yum install git autoconf automake autogen bison flex libpcap-devel libmaxminddb-devel hiredis-devel redis glib2-devel libxml2-devel sqlite-devel gcc-c++ libtool wget libcurl-devel pango-devel cairo-devel libpng-devel mysql-devel libnetfilter_queue-devel zlib-devel which libcap-devel readline-devel zeromq-devel json-c-devel geoipupdate
On MacOSX (using http://brew.sh)
brew install redis hiredis autoconf automake libtool rrdtool wget pkg-config git mysql geoipupdate
On MacOSX (using mac ports)
port install redis hiredis autoconf automake libtool rrdtool wget pkgconfig git geoipupdate
On FreeBSD
See README.FreeBSD
On Windows you can download the redis server from
- https://github.com/rgl/redis/downloads
Note that:
- you can use zmq 4.x in addition to 3.x (but not 2.x)
- make sure nobody owns /var/lib/ntopng
- make sure to have uglify-es to minify javascript code, just type, in the command line, `npm install -g uglify-es` to install it (`./autogen.sh && ./configure` is required after installing uglify-es, before running `make minify`)
- make sure to have clean-css-cli to minify and optimize the css code, just type, in the command line, `npm install -g clean-css-cli`
Source Code Compilation
-----------------------
Once you have installed all the prerequisites do
# cd <compilation directory>
# git clone https://github.com/ntop/nDPI.git
# cd nDPI; ./autogen.sh; ./configure; make; cd ..
# git clone https://github.com/ntop/ntopng.git
# cd ntopng
# ./autogen.sh
# ./configure
# make
Binary Packages
---------------
- Debian/CentOS/Windows http://packages.ntop.org
- OSX Homebrew
# brew update
# brew install ntopng