Untuk kebutuhan rencana tesis, diperlukan ns2 (network simulator 2) terpasang di debian.
Akhirnya dapat referensi yang to the point menerangkan tentang instalasi ns-allinone (tidak satu persatu, tapi di bundle jadi satu).
Berikut langkah-langkahnya :
1. Install required packages
$ sudo apt-get install build-essential autoconf automake libxmu-dev
2. Download ns terbaru (saat saya menulis ini versi 2.33)
ns-allinone bisa di download dari http://www.isi.edu/nsnam/ns/ns-build.html
2. Extract file hasil download
$ tar -zxvf ./ns-allinone-2.33.tar.gz
3. Masuk ke directory hasil extract
$ cd ns-allinone-2.33
4. Lakukan instalasi ns-allinone
$ ./install
5. Perhatikan hasil instalasi
Ns-allinone package has been installed successfully.
Here are the installation places:
tcl8.4.18: /home/tim/ns-allinone-2.33/{bin,include,lib}
tk8.4.18: /home/tim/ns-allinone-2.33/{bin,include,lib}
otcl: /home/tim/ns-allinone-2.33/otcl-1.13
tclcl: /home/tim/ns-allinone-2.33/tclcl-1.19
ns: /home/tim/ns-allinone-2.33/ns-2.33/ns
nam: /home/tim/ns-allinone-2.33/nam-1.13/nam
xgraph: /home/tim/ns-allinone-2.33/xgraph-12.1
gt-itm: /home/tim/ns-allinone-2.33/itm, edriver, sgb2alt, sgb2ns, sgb2comns, sgb2hierns
———————————————————————————-
Please put /home/tim/ns-allinone-2.33/bin:/home/tim/ns-allinone-2.33/tcl8.4.18/unix:/home/tim/ns-allinone-2.33/tk8.4.18/unix
into your PATH environment; so that you’ll be able to run itm/tclsh/wish/xgraph.
IMPORTANT NOTICES:
(1) You MUST put /home/tim/ns-allinone-2.33/otcl-1.13, /home/tim/ns-allinone-2.33/lib,
into your LD_LIBRARY_PATH environment variable.
If it complains about X libraries, add path to your X libraries
into LD_LIBRARY_PATH.
If you are using csh, you can set it like:
setenv LD_LIBRARY_PATH <paths>
If you are using sh, you can set it like:
export LD_LIBRARY_PATH=<paths>
(2) You MUST put /home/tim/ns-allinone-2.33/tcl8.4.18/library into your TCL_LIBRARY environmental
variable. Otherwise ns/nam will complain during startup.
After these steps, you can now run the ns validation suite with
cd ns-2.33; ./validate
For trouble shooting, please first read ns problems page
http://www.isi.edu/nsnam/ns/ns-problems.html. Also search the ns mailing list archive
for related posts.
6. Gunakan text-editor untuk set environment parameter
$ vim ~/.bashrc
Dan tambahkan baris-baris berikut setelah baris terakhir (ganti /home/name menjadi path home user anda sendiri) :
# LD_LIBRARY_PATH
OTCL_LIB=/home/name/ns-allinone-2.33/otcl-1.13
NS2_LIB=/home/name/ns-allinone-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/name/ns-allinone-2.33/tcl8.4.18/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB
# PATH
XGRAPH=/home/name/ns-allinone-2.33/bin:/home/name/ns-allinone-2.33/tcl8.4.18/unix:/home/name/ns-allinone-2.33/tk8.4.18/unix
NS=/home/tim/ns-allinone-2.33/ns-2.33/
NAM=/home/tim/ns-allinone-2.33/nam-1.13/
PATH=$PATH:$XGRAPH:$NS:$NAM
7. Aktifkan environment yang sudah di update
$ source ~/.bashrc
8. ns2 sudah siap digunakan, jika diperlukan, lakukan validasi (catatan : validasi membutuhkan waktu yang lama)
$ sh ~/ns-allinone-2.33/ns-2.33/validate
Referensi : http://suchaxplore.blogspot.com/2008/07/install-ns2-allinone-233-on-ubuntu-804.html