-
Notifications
You must be signed in to change notification settings - Fork 54
Installation guide
Download and install Go 1.7 or later.
Then install following dependencies from the AUR repository:
yaourt -S libtrace libflowmanager libprotoident
go-dpi requires Go 1.7 or later, so you should install that first if you don’t have it.
sudo apt-get install golang-1.7-go
liblinear
is also needed for the machine learning module. To install it, use the following commands.
sudo apt-get install liblinear3 liblinear-dev
If the liblinear3
package is not available on your distribution, you can also use the earlier ones.
Besides that, you can also install the libraries nDPI
and libprotoident
if you wish for go-dpi to use them. They may be installed with the following commands.
echo "deb http://packages.wand.net.nz trusty main" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get -y --force-yes install git gcc autoconf automake libtool libpcap-dev libtrace4 libtrace4-dev libprotoident libprotoident-dev
git clone --branch 3.2-stable https://github.com/ntop/nDPI/ /tmp/nDPI
cd /tmp/nDPI && ./autogen.sh && ./configure && make && sudo make install && cd -
Please note: If you don't install any of the two libraries above, you should let go-dpi know about it, or it won't be able to build and run successfully. By editing the file modules/wrappers/wrappers_config.h
, you can disable the two libraries. Simply uncomment the appropriate lines (they are annotated inside the file) by removing the //
in front of them in order to disable them.
Please note: You might have to specify the header files before building: CGO_CFLAGS="-I/usr/include/liblinear"
You are now able to install the library! Glide is also installed in order to help with the management of the dependencies.
go get github.com/mushorg/go-dpi
go get github.com/Masterminds/glide
cd "$(go env GOPATH)/src/github.com/mushorg/go-dpi"
$(go env GOPATH)/bin/glide install
You are now ready to use the library from your own project! You should be able to confirm the installation is complete by going to the go-dpi directory and running the tests.
go test . ./modules/wrappers ./modules/classifiers ./types ./utils