Wednesday 20 March 2013

HOW TO INSTALL NS2.35 IN UBUNTU 12.04 LTS

 STEP1: Make it sure that internet connectivity is good. Download NS2.35 from           http://www.isi.edu/nsnam/ns 

 Step2 :   Make a new folder [ns] in /home.

              Extracts downloaded files in above folder.


Step 3  :  copy downloaded ns-allinone-2.35.tar.gz in /home/ns

 Step 4 :  open terminal

Step 5 :   Run following commands  
               cd ns-allinone-2.35
               sudo apt-get update
               sudo apt-get install build-essential autoconf automake libxmu-dev      

Step 6 :  Run following command
              ./install

Step7 :  Run following command to install X – graph
             $ sudo apt-get install xgraph

Step 8Set environment variables
             run this command
              gedit ~/.bashrc


      Add the following lines to the end of the file. Remember replace
      "/your/path" by the folder where you have stored extracted the ns-2
      file (For example, if your Linux account name is purple, and you have  
     extracted the file to your home directory, you have to change /your  
     path to /home/ns)

     CONTINUED..
     # LD_LIBRARY_PATH
      OTCL_LIB=/your/path/ns-allinone-2.35/otcl-1.13
      NS2_LIB=/your/path/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_LIB

    # TCL_LIBRARY

      TCL_LIB=/your/path/ns-allinone-2.35/tcl8.4.18/library
      USR_LIB=/usr/lib
     export TCL_LIBRARY=$TCL_LIB:$USR_LIB
     # PATH
     XGRAPH=/your/path/ns-allinone-2.35/bin:/your/path/ns-allinone-  2.35/tcl8.4.18/unix:/your/path/      ns-        allinone- 2.35/tk8.4.18/unix
    NS=/your/path/ns-allinone-2.35/ns-2.35/
    NAM=/your/path/ns-allinone-2.35/nam-1.14/
    PATH=$PATH:$XGRAPH:$NS:$NAM

Step 9:    run following command
             source ~/.bashrc

           Now you can run your ns with ns command...
           The "%" symbol appears on the screen. Type "exit" to quit.
  •                      THANK YOU…



www.w3schools.com for  More  information about web  Dovelopment

No comments:

Post a Comment