Skip to content

Instantly share code, notes, and snippets.

@iamgroot42
Created March 11, 2018 15:03
Show Gist options
  • Save iamgroot42/36903caace2b436da1575cf045c7e284 to your computer and use it in GitHub Desktop.
Save iamgroot42/36903caace2b436da1575cf045c7e284 to your computer and use it in GitHub Desktop.
Installation of ns3, protobuf and zeromq on Ubuntu 16
#!/bin/bash
# Install pre-requisites
sudo apt-get -y install gcc g++ python
sudo apt-get -y install mercurial python-setuptools git
sudo apt-get -y install qt5-default
sudo apt-get -y install python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev ipython
sudo apt-get -y install openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
sudo apt-get -y install autoconf cvs bzr unrar
sudo apt-get -y install gdb valgrind
sudo apt-get -y install uncrustify
sudo apt-get -y install doxygen graphviz imagemagick
sudo apt-get -y install texlive texlive-extra-utils texlive-latex-extra texlive-font-utils texlive-lang-portuguese dvipng
sudo apt-get -y install python-sphinx dia
sudo apt-get -y install gsl-bin
sudo apt-get update
sudo apt-get -y install libgsl-dev
# Problem : libgsl2
sudo apt-get -y install flex bison libfl-dev
sudo apt-get -y install tcpdump
sudo apt-get -y install sqlite sqlite3 libsqlite3-dev
sudo apt-get -y install libxml2 libxml2-dev
# Switch to gcc 4.9 (if on Ubuntu 14)
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test
# sudo apt-get update
# sudo apt-get -y install gcc-4.9 g++-4.9
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
sudo apt-get -y install cmake libc6-dev libc6-dev-i386 libclang-dev
sudo pip install cxxfilt
sudo apt-get -y install libgtk2.0-0 libgtk2.0-dev
sudo apt-get -y install vtun lxc
sudo apt-get -y install libboost-signals-dev libboost-filesystem-dev
sudo apt-get -y install qt4-dev-tools
# Start Installation
cd
mkdir repos
cd repos
hg clone http://code.nsnam.org/ns-3-allinone
cd ns-3-allinone
./download.py -n ns-3-dev
./build.py
cd /ns-3-dev
./test.py
# Install protobuf
cd
# curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# sudo mv protoc3/bin/* /usr/local/bin/
# sudo chown $(whoami) /usr/local/bin/protoc
# sudo chown -R $(whoami) /usr/local/include/google
# sudo apt-get -y install libprotobuf-dev protobuf-compiler
sudo apt-get -y install autoconf automake libtool curl make g++ unzip
git clone https://github.com/google/protobuf.git
cd protobuf
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig
cd python
sudo python setup.py install
# Install zeroMQ
sudo su
echo "deb http://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/ ./" >> /etc/apt/sources.list
exit
wget https://download.opensuse.org/repositories/network:/messaging:/zeromq:/release-stable/Debian_9.0/Release.key -O- | sudo apt-key add
sudo apt-get -y install libzmq3-dev
sudo pip install pyzmq
echo "Successful!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment