VMware 6.5+Ubuntu 8.04+NS2.34安装

虚拟机上安装Ubuntu(见 http://xgucs.blog.51cto.com/852283/175465)
 
1安装必须的软件环境:
 sudo apt-get install build-essential autoconf automake libxmu-dev
2下载NS2.34并解压:
  cd ~
  wget http://nchc.dl.sourceforge.net/sourceforge/nsnam/ns-allinone-2.34.tar.gz
  tar -xzvf ns-allinone-2.34.tar.gz
3安装NS2:
   cd ns-allinone-2.34
   sudo ./install
等待。。。。。。。。
成功后会提示有关路径的设置信息!
4更改启动环境变量:
  sudo gedit ~/.bashrc
在文件最后添加以下文本:
export NS_HOME=~/ns-allinone-2.34
# LD_LIBRARY_PATH
OTCL_LIB=$NS_HOME/otcl-1.13
NS2_LIB=$NS_HOME/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB
# TCL_LIBRARY
TCL_LIB=$NS_HOME/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=$NS_HOME/bin:$NS_HOME/tcl8.4.18/unix:$NS_HOME/tk8.4.18/unix
NS=$NS_HOME/ns-2.34/
NAM=$NS_HOME/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM
 
保存退出后执行:sudo source ~/.bashrc
 
5验证NS是否安装成功:
   $ ns回车后,若出现%则安装成功!!!
 
 
  

你可能感兴趣的:(vmware,ubuntu,职场,休闲,ns2)