kazim
Member level 4
- Joined
- May 26, 2006
- Messages
- 77
- Helped
- 6
- Reputation
- 12
- Reaction score
- 3
- Trophy points
- 1,288
- Location
- Nowshera, Pakistan
- Activity points
- 1,838
ns2 installation
you can follow these steps in any linux environment
INSTALLING NS-2 ON FEDORA 8
STEP 1
From terminal login as super user and do the following.(internet must also be connected in order to install the package dependencies.
yum install autoconf
yum install automake
yum install gcc-c++
yum install libX11-devel
yum install xorg-x11-proto-devel
yum install libXt-devel
And for nam installation (optional):
yum install libXmu-devel
STEP 2
From terminal go to the folder where the ns-allinone patch is placed and type the following to extract
$ tar -xzf ns-allinone-2.31.tar.gz
$ cd ns-allinone-2.29
$. /install
STEP 3
Now go to /etc folder and type
gedit ~/.bashrc
Add the following lines to the end of it. Remember replace "/your/path" by something like "/home/kazim". And accordingly also change the version numbers. This is for ns 2.31.
# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.31/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.31/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=/your/path/ns-allinone-2.31/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/your/path/ns-allinone-2.31/bin:/your/path/ns-allinone-2.31/tcl8.4.14/unix:/your/path/ns-allinone-2.31/tk8.4.14/unix
NS=/your/path/ns-allinone-2.31/ns-2.31/
NAM=/your/path/ns-allinone-2.31/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
Let it take effect immediately
source ~/.bashrc
Note: the step described above is important; otherwise, you cannot run ns successfully.
or you can restart your X windows.i.e. logout and then login, or reboot your system, to make it work.)
Now, the installation has been completed. If you try:
$ ns
Then a "%" will appear on the screen.type "exit" to quit the mode and back to "$"
If you miss out step 1 you may get the following errors
Build XGraph-12.1
============================================================
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
make: *** No targets specified and no makefile found. Stop.
Can not create xgraph; But xgraph is an optional package, continuing...
If you miss step 3
At the prompt when you type ns you will get
Ns command not found
you can follow these steps in any linux environment
INSTALLING NS-2 ON FEDORA 8
STEP 1
From terminal login as super user and do the following.(internet must also be connected in order to install the package dependencies.
yum install autoconf
yum install automake
yum install gcc-c++
yum install libX11-devel
yum install xorg-x11-proto-devel
yum install libXt-devel
And for nam installation (optional):
yum install libXmu-devel
STEP 2
From terminal go to the folder where the ns-allinone patch is placed and type the following to extract
$ tar -xzf ns-allinone-2.31.tar.gz
$ cd ns-allinone-2.29
$. /install
STEP 3
Now go to /etc folder and type
gedit ~/.bashrc
Add the following lines to the end of it. Remember replace "/your/path" by something like "/home/kazim". And accordingly also change the version numbers. This is for ns 2.31.
# LD_LIBRARY_PATH
OTCL_LIB=/your/path/ns-allinone-2.31/otcl-1.13
NS2_LIB=/your/path/ns-allinone-2.31/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=/your/path/ns-allinone-2.31/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/your/path/ns-allinone-2.31/bin:/your/path/ns-allinone-2.31/tcl8.4.14/unix:/your/path/ns-allinone-2.31/tk8.4.14/unix
NS=/your/path/ns-allinone-2.31/ns-2.31/
NAM=/your/path/ns-allinone-2.31/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
Let it take effect immediately
source ~/.bashrc
Note: the step described above is important; otherwise, you cannot run ns successfully.
or you can restart your X windows.i.e. logout and then login, or reboot your system, to make it work.)
Now, the installation has been completed. If you try:
$ ns
Then a "%" will appear on the screen.type "exit" to quit the mode and back to "$"
If you miss out step 1 you may get the following errors
Build XGraph-12.1
============================================================
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking if malloc debugging is wanted... no
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
make: *** No targets specified and no makefile found. Stop.
Can not create xgraph; But xgraph is an optional package, continuing...
If you miss step 3
At the prompt when you type ns you will get
Ns command not found