Install NS2 on Ubuntu

转载 2012年03月23日 23:34:30

http://blog.ceglug.org/venkat/?p=26


Installing NS2 in simple 5 steps

Posted on August 23 2009 by Venkatanathan

Step 1: Download the source for NS2 all in one (I used this version ns-allinone-2.34.tar.gz ) from the link http://sourceforge.net/projects/nsnam/files/

Step 2: Extract the tar.gz file downloaded into your home folder by right-clicking the tag.gz file

Step 3: Open terminal (Applications–>Accessories–>Terminal) and change the directory (using cd command) to the extracted folder and execute the following:

sudo apt-get install build-essential autoconf automake libxmu-dev

This will install the dependencies required to compile NS2 from the source.

The following command is used to compile the source.

./install

It will take long time to compile all the required packages for ns to work…

Step 4: Setting Environmental Variables

Type in terminal:

gedit ~/.bashrc

and append the following text to the opened file (Please note that the path contains the path in my system, replace “venkat” in path with your username)

# LD_LIBRARY_PATH
OTCL_LIB=/home/venkat/ns-allinone-2.34/otcl-1.13
NS2_LIB=/home/venkat/ns-allinone-2.34/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=/home/venkat/ns-allinone-2.34/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/home/venkat/ns-allinone-2.34/bin:/home/venkat/ns-allinone-2.34/tcl8.4.18/unix:/home/venkat/ns-allinone-2.34/tk8.4.18/unix
NS=/home/venkat/ns-allinone-2.34/ns-2.34/
NAM=/home/venkat/ns-allinone-2.34/nam-1.14/
PATH=$PATH:$XGRAPH:$NS:$NAM

Step 5: Now, after editing the file, save and close it. Then in terminal type:

source ~/.bashrc

Try “ns” command, it shud go to the “%” prompt then it just means the installation was successful! Enjoy :D

Note: These steps have been tested and worked like breeze in Ubuntu and is expected work in all the debian based linux.

Reference:

1.) http://nsnam.isi.edu/nsnam/index.php/Installing_ns2.31_on_Ubuntu7.04
2.) http://alkautsarpens.wordpress.com/2008/02/05/install-ns231-for-ubuntu-gutsy-710/
3.) http://www.isi.edu/nsnam/ns/ns-build.html (Might not be needing this, but just in case)



Install Pdf2htmlEX on Amazon Linux and Ubuntu

在Amazon Linux和Ubuntu上安装Pdf2htmlEX

How to install p2psim on ubuntu.10.10

actually it doesn't matter if you which little version of gcc-2.95 or -3.3, the difference between 2...
  • Jae34
  • Jae34
  • 2011年02月26日 14:12
  • 713

How To Install ns3 on linux ? [转]

转自: http://wirelesscafe.wordpress.com/2011/01/15/how-to-install-ns3-on-linux/ Happy New Year to a...

Install Ubuntu 14.04 on i.MX7D-SDB

  • 2017年09月06日 18:59
  • 583KB
  • 下载

Configure And Install Pjsip on Ubuntu14

  • 2016年08月07日 22:52
  • 3KB
  • 下载

mac下修改后的ns2 install文件

#! /bin/sh  #  # Copyright (C) 2000 by USC/ISI  # All rights reserved.  #  # Redistribution and...

How_to_install_JDK1.5_on_Ubuntu

  • 2012年08月26日 20:14
  • 311KB
  • 下载

ns-allinone-2.34 installation on Ubuntu 12.10

1)     Downloadthe setup files from http://sourceforge.net/projects/nsnam/files/allinone/ns-allinon...

How to install VNC on Ubuntu

尽管我们在大部分情况下用ssh登录Ubuntu服务器就好了,但是有时候我们的程序需要在图形界面下运行,这时我们就要用到vnc server这个软件了。在Ubuntu下安装vnc server很简单...

How to install Cacti on Ubuntu

Installation prerequisite The following packages are required to run Cacti properly Apache2 #...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:Install NS2 on Ubuntu
举报原因:
原因补充:

(最多只允许输入30个字)