作者:三号天宫 | 来源:互联网 | 2017-05-12 15:45
作者:金良(golden1314521@gmail.com)csdn博客:blog.csdn.netu012176591去官网(NS2官网链接)下载你要的安装包版本,我下载的是ns-2.35,是2011年发布的。把压缩包ns-allinone-2.35.tar.gz解压到你要安装的位置,例如路径homejin下,命令
作者:金良(golden1314521@gmail.com) csdn博客:http://blog.csdn.net/u012176591 去官网(NS2官网链接)下载你要的安装包版本,我下载的是ns-2.35,是2011年发布的。 把压缩包ns-allinone-2.35.tar.gz解压到你要安装的位置,例如路径/home/jin/下,命令
作者:金良(golden1314521@gmail.com) csdn博客:http://blog.csdn.net/u012176591
去官网(NS2官网链接)下载你要的安装包版本,我下载的是ns-2.35,是2011年发布的。
把压缩包ns-allinone-2.35.tar.gz解压到你要安装的位置,例如路径/home/jin/下,命令为
tar zxvf ns-allinone-2.35.tar.gz /home/jin
然后进入解压目录,安装,命令为
./install
顺利地话,几分钟后安装完毕,系统给出以下信息:
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.5.10: /home/jin/ns-allinone-2.35/{bin,include,lib}
tk8.5.10: /home/jin/ns-allinone-2.35/{bin,include,lib}
otcl: /home/jin/ns-allinone-2.35/otcl-1.14
tclcl: /home/jin/ns-allinone-2.35/tclcl-1.20
ns: /home/jin/ns-allinone-2.35/ns-2.35/ns
xgraph: /home/jin/ns-allinone-2.35/xgraph-12.2
gt-itm: /home/jin/ns-allinone-2.35/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns
----------------------------------------------------------------------------------
Please put /home/jin/ns-allinone-2.35/bin:/home/jin/ns-allinone-2.35/tcl8.5.10/unix:/home/jin/ns-allinone-2.35/tk8.5.10/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/jin/ns-allinone-2.35/otcl-1.14, /home/jin/ns-allinone-2.35/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=
(2) You MUST put /home/jin/ns-allinone-2.35/tcl8.5.10/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.
After these steps, you can now run the ns validation suite with
cd ns-2.35; ./validate
For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
按照系统给出的信息,进行以下配置:
export PATH="$PATH:/home/jin/ns-allinone-2.35/bin:/home/jin/ns-allinone-2.35/tcl8.5.10/unix:/home/jin/ns-allinone-2.35/tk8.5.10/unix"
export LD_LIBRARY_PATH="/home/jin/ns-allinone-2.35/bin:/home/jin/ns-allinone-2.35/tcl8.5.10/unix:/home/jin/ns-allinone-2.35/tk8.5.10/unix"
export TCL_LIBRARY="/home/jin/ns-allinone-2.35/tcl8.5.10/library"
然后
apt-get install ns2
apt-get install nam
cd ns-2.35/
./validate
最后一步需要很长时间,学会等待。。。
执行结束,系统有如下提示:
validate overall report: some tests failed:
./test-all-newreno ./test-all-tcpOptions ./test-all-tcpVariants ./test-all-aimd ./test-all-frto ./test-all-quickstart ./test-all-manual-routing ./test-all-links
to re-run a specific test, cd tcl/test; ./test-all-TEST-NAME
要获得NS2资料的同学,这里有个网址(资料链接)有大量的学习资源