Created
February 13, 2015 20:48
-
-
Save ahmadsoe/aa72c07ead73b4c8565c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install ns2 | |
$cd ~ | |
$wget http://downloads.sourceforge.net/project/nsnam/allinone/ns-allinone-2.35/ns-allinone-2.35.tar.gz | |
$wget https://www.dropbox.com/s/cngpdd38hx49p49/zrp-ns235.patch | |
$sudo apt-get update | |
$sudo apt-get upgrade | |
$sudo apt-get install tcl8.5-dev tk8.5-dev | |
$sudo apt-get install build-essential autoconf automake | |
$sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev | |
$sudo apt-get install gcc-4.4 | |
$tar -xvzf ns-allinone-2.35.tar.gz | |
$cd ns-allinone-2.35 | |
$patch -p0 < zrp-ns235.patch | |
$gedit ns-2.35/linkstate/ls.h | |
################ | |
## edit line 137 | |
## erase to this—>erase | |
$export CC=gcc-4.4 CXX=g++-4.4 && ./install | |
$sudo gedit .bashrc | |
####################### | |
# LD_LIBRARY_PATH | |
OTCLLIB=~/ns-allinone-2.35/otcl-1.14 | |
NS2=~/ns-allinone-2.35/lib | |
USR_LocalLIB=/usr/local/lib | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCLLIB:$NS2:$USR_LocalLIB | |
# TCL_LIBRARY | |
TCLIB=~/ns-allinone-2.35/tk8.5.10/library | |
USRLIB=/usr/lib | |
export TCL_LIBRARY=$TCLIB:$USRLIB | |
# PATH | |
XGRAPH=~/ns-allinone-2.35/xgraph-12.2/:~/ns-allinone-2.35/bin:~/ns-allinone-2.35/tcl8.5.10/unix:~/ns-allinone-2.35/tk8.5.10/unix | |
NS=~/ns-allinone-2.35/ns-2.35 | |
NAM=~/ns-allinone-2.35/nam-1.15 | |
export PATH=$PATH:$XGRAPH:$NS:$NAM | |
##################################### | |
$source ~/.bashrc | |
$cd ns-2.35 | |
$./validate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment