Linux下安装NS2.33(建议Fedora 8)(2)

就是mkdir /home/share,然后把ns-allinone-2.33都放进去,然后path直接用以下设置,在/home下修改.bashrc(ps:这个改的安全点,etc下面的也行,不过改多了会乱)

改这个vi /home/www.linuxidc.cm /.bashrc

在末尾添加如下,保存就行了

# NS 2.33 config
export PATH="$PATH:/home/share/ns-allinone-2.33/bin:/home/share/ns-allinone-2.33/tcl8.4.18/unix:/home/share/ns-allinone-2.33/tk8.4.18/unix"  
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/share/ns-allinone-2.33/otcl-1.13:/home/share/ns-allinone-2.33/lib"  
export TCL_LIBRARY="$TCL_LIBRARY:/home/share/ns-allinone-2.33/tcl8.4.18/library"  


不是这个目录的可以对应下面,应该能明白怎么修改的吧


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

对应修改Path

You MUST put /home/share/ns-allinone-2.33/otcl-1.13, /home/share/ns-allinone-2.33/lib, 
    into your LD_LIBRARY_PATH environment variable.

对应修改LD_LIBRARY

You MUST put /home/share/ns-allinone-2.33/tcl8.4.18/library into your TCL_LIBRARY environmental
    variable. Otherwise ns/nam will complain during startup.

对应修改TCL_LIBRARY


现在可以大致测试下了,ns-allinone-2.33/ns-2.33目录下运行

[root@localhost ns-2.33]# ./validate 

不会出现could not found就是ok了

然后测试nam,

[root@localhost ns-2.33]# nam

会出现个图形的框子就是可以的了,这样ns2就基本配置好了

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/21606.html