This is an example of the --2.33 installation for 8.04.
Download the most recent Ns-2--2.33 from Sourceforge.
Suppose that there is “ns--2.33.tar.gz” in current directory (e.g. “~/” for me is “/home/mm”).
All steps are done in Terminal, so open a terminal in Accessories/Terminal.
To extract the file:
tar xvfz ./ns--2.33.tar.gz
Go into extracted directory:
cd ns--2.33
Download required packages:
sudo apt-get build-essential autoconf automake libxmu-dev
Start installation:
./
Set environment parameter:
gedit ~/.bashrc
Then at the last line, append the following text with changing “/your/path” to the directory that contains “ns--2.33″. (e.g. “/home/jimey/” )

# LD_LIBRARY_PATH
OTCL_LIB=/home/jimey/ns--2.33/otcl-1.13
NS2_LIB=/home/jimey/ns--2.33/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/jimey/ns--2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/jimey/ns--2.33/bin:/home/jimey/ns--2.33/tcl8.4.18/unix:/home/jimey/ns--2.33/tk8.4.18/unix
NS=/home/jimey/ns--2.33/ns-2.33/
NAM=/home/jimey/ns--2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM

Let it take effect immediately:

$ source ~/.bashrc

[via]

标签:, , ,

相关日志


相关博文

评论

Good.Be the first to comment on this entry.

Post comment

comment has COPYRIGHT too!