How to install ndnSIM and basic development environment on a Debian machine - Waseda-Sato-lab/ccn-sim GitHub Wiki
This page summarizes what I did to get a functional ndnSIM and a development environment for the lab.
Requirements
All that is required is a machine running Debian or a Debian clone distribution. The instructions here have been used successfully on Debian 7.4. Ubuntu 13.10 has also been successfully tried, but requires particular settings due to the default installation of gcc 4.8.
I am a fan of Codeblocks as a C/C++ IDE, so before installing the dependencies I add the following lines to /etc/apt/sources.list:
deb http://apt.jenslody.de/stable wheezy release
deb-src http://apt.jenslody.de/stable wheezy release
Then you update the apt-get data:
# apt-get update
Install the new keys:
# apt-get install jens-lody-debian-keyring
Another popular IDE is the Eclipse IDE for C/C++ Developers. This wiki also contains a small tutorial to enable Eclipse to make ns-3 development easier.
The dependencies, on Debian, to build ndnSIM and nsclick can be resolved with the following command lines:
# apt-get install git libboost-all-dev build-essential subversion python-dev python-pygraphviz python-gnomedesktop python-kiwi python-pygoocanvas python-gnome2 python-rsvg ipython flex bison valgrind doxygen libxml2 libxml2-dev gtk+2.0 gsl-bin libgsl0ldbl libgsl0-dev screen libsqlite3-dev python-pygccxml wx-common cscope-el libgnomeprintui2.2-0 gawk
If you also want Code::Blocks, the following command can be used:
# apt-get install codeblocks codeblocks-contrib
The dependencies, on Ubuntu, to build ndnSIM and nsclick can be resolved with the following command lines:
# apt-get install git libboost-all-dev build-essential subversion python-dev python-pygraphviz python-gnome2-desktop-dev python-kiwi python-pygoocanvas python-gnome2 python-rsvg ipython flex bison valgrind doxygen libxml2 libxml2-dev gtk+2.0 gsl-bin libgsl0ldbl libgsl0-dev screen libsqlite3-dev python-pygccxml wx-common cscope-el gawk
Take into account that the installation of these packages will easily require about 1GB of hard drive space.
Once all the packages are installed, we can pull the sources for click and ndnSIM. First we create a directory in which to store things:
# mkdir ndnSIM
We assume that the complete path of the directory we just created is /root/ndnSIM
. Please adjust this path to whatever you are using when following the instructions below.
Installation
Click
We proceed to pull the source code for click:
# cd ndnSIM; git clone git://github.com/kohler/click.git
Now we configure the source:
# cd click; ./configure --prefix=/usr --enable-userlevel --disable-linuxmodule --enable-nsclick
Finally we compile and install:
# make && make install
ndnSIM
We proceed to pull the source code for ndnSIM:
# cd ndnSIM; git clone git://github.com/cawka/ns-3-dev-ndnSIM.git ns-3
# git clone git://github.com/cawka/pybindgen.git pybindgen
# git clone git://github.com/NDN-Routing/ndnSIM.git ns-3/src/ndnSIM
Now we configure the source:
# cd ns-3; ./waf configure -d optimized --prefix=/usr --enable-tests --enable-examples
The configuration should find all the required libraries with the notable exceptions of BRITE and MPI. Next we compile:
# ./waf
Finally we install:
# ./waf install