Skip to content

Instantly share code, notes, and snippets.

@jjones646
Last active July 9, 2016 19:21
Show Gist options
  • Save jjones646/93ebeba1b2f7f13c96b929eb33279cb1 to your computer and use it in GitHub Desktop.
Save jjones646/93ebeba1b2f7f13c96b929eb33279cb1 to your computer and use it in GitHub Desktop.
Basic setup script for downloading & compiling ns-3 modules using bake
#!/bin/bash
# Simple setup script for dce-python-sdn
#
# Use 'chmod +x dce-sdn-setup.sh' then run using './dce-sdn-setup.sh'
echo "installing mandatory packages"
sudo apt-get update
sudo apt-get install -y git hg python
echo "installing components required for dce-python-sdn"
sudo apt-get install -y autoconf libtool build-essential pkg-config libevent-dev libssl-dev libreadline-dev openjdk-7-jdk libx11-dev libxext-dev libxtst-dev libxt-dev libcups2-dev libasound2-dev ccache
hg clone http://code.nsnam.org/ns-3-allinone
cd ns-3-allinone && ./download.py
cd -
hg clone http://code.nsnam.org/bake bake
export BAKE_HOME="$(pwd)/bake"
export PATH="$PATH:$BAKE_HOME"
export PYTHONPATH="$PYTHONPATH:$BAKE_HOME"
git clone https://github.com/jaredivey/dce-python-sdn
cd dce-python-sdn
bake.py configure -c bakeconf-sdn.xml -e libfluid
bake.py download
sudo ../bake/bake.py build -vvv
rmdir build
sudo rm bakefile.xml bakeSetEnv.sh
bake.py configure -c bakeconf-sdn.xml -e dce-sdn-1.7
bake.py download
bake.py build -vvv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment