Installation Environment: Ubuntu14.04 Desktop Edition
Purpose: To install ns3.25
Note: After the first installation, it was found that the visualizer module (for drawing) was not properly installed, so it had to be reinstalled. When downloading, use the wget tool to download the TAR source package directly (because the TAR package comes with the Pybindgen tool), do not use the mercurial download, Otherwise, when compiling the installation, the prompt does not provide pythonbindings and cannot install the visualizer module.
Here I step by step how to install ns3.25
1. Download and install the ns3.25 dependency package, in order to be simple, I wrote a script to install all the required packages.
CD ~
Vim pre.sh
#!/bin/bash
Apt-get install-y gcc g++ python
Apt-get install-y gcc g++ python python-dev
Apt-get install-y Qt4-dev-tools Libqt4-dev
Apt-get Install-y Mercurial
Apt-get install-y BZR
Apt-get install-y cmake Libc6-dev libc6-dev-i386 g++-multilib
Apt-get install-y gdb Valgrind
Apt-get install-y gsl-bin Libgsl0-dev libgsl0ldbl
Apt-get Install-y Flex Bison Libfl-dev
Apt-get install-y tcpdump
Apt-get install-y SQLite sqlite3 Libsqlite3-dev
Apt-get install-y libxml2 Libxml2-dev
Apt-get install-y libgtk2.0-0 Libgtk2.0-dev
Apt-get install-y Vtun LXC
Apt-get install-y uncrustify
Apt-get install-y Doxygen Graphviz ImageMagick
Apt-get install-y texlive texlive-extra-utils texlive-latex-extra texlive-font-utils Texlive-lang-portuguese dvipng
Apt-get install-y Python-sphinx Dia
Apt-get install-y python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev Ipython
Apt-get install-y Libboost-signals-dev Libboost-filesystem-dev
Apt-get install-y openmpi-bin Openmpi-common openmpi-doc Libopenmpi-dev
[Email protected]]chmod +x pre.sh
[Email protected]]./pre.sh #执行该脚本
2. Download NS3
CD #进入到家目录
mkdir tarballs
CD Tarballs
wget http://www.nsnam.org/release/ns-allinone-3.25.tar.bz2
Tar XF ns-allinone-3.25.tar.bz2
CD ns-allinone-3.25
3. Compile and install NS3
In fact, there are three ways to compile ns3. (./build.py./waf or Bake)
Here we use the./build.py Way
Executes at the command line./build.py--enable-tests--enable-examples
######### #接下类是相当漫长的编译时间 ####################################
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/84/05/wKioL1eDb9Ojq3uAAAMD6Pq19zw049.jpg-wh_500x0-wm_3 -wmp_4-s_4208092447.jpg "Title=" after the installation is complete the interface "alt=" Wkiol1edb9ojq3uaaamd6pq19zw049.jpg-wh_50 "/>
appears as above interface instructions installation complete
4. Test
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/84/05/wKioL1eDcJawJOpjAAGhVwtvSoQ588.jpg-wh_500x0-wm_3 -wmp_4-s_1139183999.jpg "title=" test. jpg "alt=" wkiol1edcjawjopjaaghvwtvsoq588.jpg-wh_50 "/>
Execution./waf--run Hello-simulator
appears as above interface to indicate successful installation
5. Test if the visualizer module is successfully installed
Copy the second.cc from the Examples/tutorial directory to the scratch directory
./WAF--run Second--vis
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/84/06/wKioL1eDcavC1EuqAAIunEd8gtg616.jpg-wh_500x0-wm_3 -wmp_4-s_514667267.jpg "title=" visualizer.jpg "alt=" Wkiol1edcavc1euqaaiuned8gtg616.jpg-wh_50 "/>
If the above interface instructions appear, the visualizer module is installed correctly.
Finally finished, exhausted me ....
Go to dinner.
This article is from the "thick Product Thin Hair" blog, please make sure to keep this source http://joedlut.blog.51cto.com/6570198/1825512
Installing the NS3.25 under Ubuntu14.04