Chinaunix首页 | 论坛 | 博客
  • 博客访问: 103695098
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-06 08:48:37

作者:ning出自:

注意:在普通用户安装ns2.30,最好不要在root下,虽然也可以安装成功,如果提示权限问题,请确认是安如下步骤进行,否则有可能你的解压在非此用户进行的。
1.下载最新版本,我这是ns2.30,ns-allinone-2.30.tar.gz
2.cp到你的目录~/
3.解压:tar -zxvf ns-allinone-2.30.tar.gz
4.安装:cp /ns-allinone-2.30
./install
等上5分钟左右,出现以下信息

Nam has been installed successfully.
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.13: /home/ninga/ns-allinone-2.30/{bin,include,lib}
tk8.4.13: /home/ninga/ns-allinone-2.30/{bin,include,lib}
otcl: /home/ninga/ns-allinone-2.30/otcl-1.12
tclcl: /home/ninga/ns-allinone-2.30/tclcl-1.18
ns: /home/ninga/ns-allinone-2.30/ns-2.30/ns
nam: /home/ninga/ns-allinone-2.30/nam-1.12/nam
xgraph: /home/ninga/ns-allinone-2.30/xgraph-12.1
gt-itm: /home/ninga/ns-allinone-2.30/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns

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

IMPORTANT NOTICES:

(1) You MUST put /home/ninga/ns-allinone-2.30/otcl-1.12, /home/ninga/ns-allinone-2.30/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/ninga/ns-allinone-2.30/tcl8.4.13/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.

(3) [OPTIONAL] To save disk space, you can now delete directories tcl8.4.13
and tk8.4.13. They are now installed under /home/ninga/ns-allinone-2.30/{bin,include,lib}

After these steps, you can now run the ns validation suite with
cd ns-2.30; ./validate

For trouble shooting, please first read ns problems page
Also search the ns mailing list archive
for related posts.
5.配置环境变量
按上面的提示就是了
vi ~/.bashrc
加入以下内容,具体目录参见上面的提示
export PATH="$PATH:/home/ninga/ns-allinone-2.30/bin:/home/ninga/ns-allinone-2.30/tcl8.4.13/unix:/home/ninga/ns-allinone-2.30/tk8.4.13/unix"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/ninga/ns-allinone-2.30/otcl-1.12, /home/ninga/ns-allinone-2.30/lib"
export TCL_LIBRARY="$TCL_LIBRARY:/home/ninga/ns-allinone-2.30/tcl8.4.13/library"
6.重启终端,以便重新载入环境变量,使刚才的配置生效。
7.验证,
A:输入ns,出现%表示成功
B:进入ns-allinone-2.30/ns-2.30,./validate(比较费时间)
阅读(370) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~