Wednesday 28 August 2013

hi dear friends today am going to show how to install ns2.34  in cent os
on before that you need to install the following packages 
                            yum install autoconf 
                            yum install automake
                            yum install gcc-c++
                            yum install libX11-devel
                            yum install libX-devel
                            yum install libXt-devel
                            yum install libXmu-devel
                       yum install xorg-x11-proto-deve
                                    finally 
                             yum update audit  

step 1:
       first download ns2.34 in
       http://sourceforge.net/projects/nsnam/files/allinone/ns-allinone-2.34/
step2:
      go to the downloaded location just click ns2.34 and right click extract here 
                                                  or else  
      go to the terminal just type the following command 
       
                    tar -zxvf ns-allinone-2.34.tar.gz
step3:
         go to the folder location where you extract the ns2.34 allinone package 
in my side i extract in desktop 
       just  type in the terminal cd ns-allinone-2.34
in this folder you see the one install file 




 now type in ./install in the terminal



now it will take 5 to 10 minutes to install  depends upon the your cpu speed
after a long time you see the important notice in terminal window 



 step 5:
now open a new terminal and type gedit .bashrc a new window will open. under the # .bashrc

 export PATH=/root/Desktop/ns-allinone-2.34/bin:/root/Desktop/ns-allinone-2.34/tcl8.4.18/unix:/root/Desktop/ns-allinone-2.34/tk8.4.18/unix:$PATH
export LD_LIBRARY_PATH=/root/Desktop/ns-allinone-2.34/otcl-1.13:/root/Desktop

/ns-allinone-2.34/lib
export TCL_LIBRARY=/root/Desktop/ns-allinone-2.34/tcl8.4.18/library
export TK_LIBRARY=/root/Desktop/ns-allinone-2.34/tcl8.4.18/library 


just copy and paste  

 with out any space and save then close the window
now type the source ~/.bashrc

You can check what is written in your path by writing

 echo $PATH 
echo $TCL_LIBRARY 
echo $LD_LIBRARY_PATH
echo $TK_LIBRARY



Now, the installation has been completed



type the nam command in terminal  the nam window will open



 there is lot example program in cd  ns-allinone-2.34/ns-2.34/tcl/ex

here i excute a simple program










2 comments:

  1. sebaiknya seperti ini

    # LD_LIBRARY_PATH
    OTCL_LIB=/home/t3ll0/Desktop/ns-allinone-2.35/otcl-1.13
    NS2_LIB=/home/t3ll0/Desktop/ns-allinone-2.35/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_$

    # TCL_LIBRARY
    TCL_LIB=/home/t3ll0/Desktop/ns-allinone-2.35/tcl8.4.18/library
    USR_LIB=/usr/lib
    export TCL_LIBRARY=$TCL_LIB:$USR_LIB

    # PATH
    XGRAPH=/home/t3ll0/Desktop/ns-allinone-2.35/bin:/home/t3ll0/Desktop/ns-allinone-2.35/tcl8.4.18/$
    NS=/alamat/ns-allinone-2.35/ns-2.34/
    NAM=/home/t3ll0/Desktop/ns-allinone-2.35/nam-1.14/
    PATH=$PATH:$XGRAPH:$NS:$NAM

    ReplyDelete
  2. dear sir .... I'm very appriciate you if you should show me file bashcr before and after changed.
    Thanks so much.
    Hope you reply soon

    ReplyDelete