Fedora 8.0 NS-2.33拆卸手记



作者: xgbmhc  出自: http://www.linuxdiyf.com
作者:wanglilife

谁说64bits的机器装不好ns,在我看来,这些措施是运转在把持零碎下的,ns能不克不及运转,现在只需把持零碎说了算,你硬件的一切要领都被把持零碎支配着,还管我能不克不及拆卸NS?

为了拆卸个NS (network simulation),这几天真是把我人都搞干瘦了。重要成即是出在不克不及主动拆卸nam这个小东西,问师长教员,搞不定!

上面是我的拆卸历程,简单的不克不及再简单!(不外,我不克不及包管其他的机器和零碎和ns版本可以正常拆卸,没钱买机器作实验,只是我现有的实验情况 [AMD Athlon 64 x2 Fedora 8.0] )

(一)下载NS的拆卸包,因为是菜鸟,入门选手,年夜约门还没入!以是我们那个实验书上举荐一次拆卸一切套件,一套拆卸上去彷佛要占用个200~300M的磁盘空间。到网站 http://www.isi.edu/nsnam/ns/ns-build.html 下载最新NS-allinone套件,我现在的最新套件是 ns-allinone-2.33 , 缩短包下载上去也有50M旁边。

(二)设置配备安排零碎情况。实在也不算设置配备安排,只是拆卸几个依托包,没有这几个依托包,我包管你100%不克不及把NS拆卸好。要拆卸依托保,只需实验上面的饬令。

#yum install gcc-c
#yum install libX11-devel
#yum install xorg-x11-proto-devel
#yum install libXt-devel

上面是主措施的编译情况和依托包,上面这条饬令是nam的依托包,固然假设你用数据就可以说明一个模拟汇集,你可以NB的不拆卸!

#yum install libXmu-devel

(三)正式拆卸NS套件。思路: 任意进一个你的家目录下,解压套件的缩短包,软后实验拆卸饬令,最初设置配备安排响应的情况变量。(假定我是拆卸在/home/mozhu/Public目录下的)

进入Public目录:
#cd /home/mozhu/Public

解缩短拆卸包:
#tar xvzf ns-allinone-2.33.tar.gz

进入解缩短后的文件夹:
#cd /home/mozhu/Public/ns-allinone-2.33

实验轮廓的一个拆卸文件,零碎就主动拆卸扫数的东西了:
#./install

拆卸完之后(得花个年夜几分钟的编译时分吧),会出现一些信息。如下:

Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.18: /home/mozhu/Public/ns-allinone-2.33/{bin,include,lib}
tk8.4.18: /home/mozhu/Public/ns-allinone-2.33/{bin,include,lib}
otcl: /home/mozhu/Public/ns-allinone-2.33/otcl-1.13
tclcl: /home/mozhu/Public/ns-allinone-2.33/tclcl-1.19
ns: /home/mozhu/Public/ns-allinone-2.33/ns-2.33/ns
nam: /home/mozhu/Public/ns-allinone-2.33/nam-1.13/nam
xgraph: /home/mozhu/Public/ns-allinone-2.33/xgraph-12.1
gt-itm: /home/mozhu/Public/ns-allinone-2.33/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

Please put /home/mozhu/Public/ns-allinone-2.33/bin:/home/mozhu/Public/ns-allinone-2.33/tcl8.4.18/unix:/home/mozhu/Public/ns-allinone-2.33/tk8.4.18/unix
into your PATH environment; so that you'll be able to run itm/tclsh/wish/xgraph.

IMPORTANT NOTICES:

(1) You MUST put /home/mozhu/Public/ns-allinone-2.33/otcl-1.13, /home/mozhu/Public/ns-allinone-2.33/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/mozhu/Public/ns-allinone-2.33/tcl8.4.18/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.33; ./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.

有了上面的信息之后,可以看出重要的东西都拆卸乐成了,接上去即是设置配备安排情况变量了。翻开一个新的控制台,

输出如下饬令:
$gedit .bashrc

在那里何处面设置配备安排情况变量,内容如下:
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi

# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

export PATH="$PATH:/home/mozhu/Public/ns-allinone-2.33/bin:/home/mozhu/Public/ns-allinone-2.33/tcl8.4.18/unix:/home/mozhu/Public/ns-allinone-2.33/tk8.4.18/unix"

export LD_LIBRARY_PATH="$LD_LIBRARY:/home/mozhu/Public/ns-allinone-2.33/otcl-1.13:/home/mozhu/Public/ns-allinone-2.33/lib"

export TCL_LIBRARY="$TCL_LIBRARY:/home/mozhu/Public/ns-allinone-2.33/tcl8.4.18/library"

增补完好之后,保管列入!这样一个完好的NS就拆卸好了。

(四)验证能否准确拆卸。网上许多几许转载贴说实验一个什么valide措施可以验证NS能否准确拆卸,还都一个劲的说什么验证 时分约莫为15minites,我真服了这些人的水,转载也不注明,也不自身动哈脑子改下或自身实验下!实在2个步骤就根本可以确定能否准确拆卸了。开一个控制台,输出如下饬令:

$ns

若出现一个%则主件拆卸乐成;

再在/home/mozhu/Public/ns-allinone-2.33/ns-2.33/tcl/ex目录下找到simple.tcl文件,实验如下:

$ns /home/mozhu/Public/ns-allinone-2.33/ns-2.33/tcl/ex/simple.tcl

若出现网路模拟动画,祝贺,你的NS根本拆卸的差不多了,固然定心用些菜鸟级此外服从吧。




版权声明: 原创作品,准许转载,转载时请务必以超链接方式标明文章 原始来因 、作者信息和本声明。否则将究查礼貌责任。

posted @ 2011-03-07 14:01  蓝色的天空III  阅读(112)  评论(0编辑  收藏  举报