shell> wget http://prdownloads.sourceforge.net/tcl/tcl8.4.15-src.tar.gz
shell> wget http://prdownloads.sourceforge.net/tcl/tk8.4.15-src.tar.gz
2. Download daily NS2 from http://www.isi.edu/nsnam/dist/daily/
shell> wget http://www.isi.edu/nsnam/dist/daily/nam-1-XXXXXXXX.tar.gz
shell> wget http://www.isi.edu/nsnam/dist/daily/ns-2-XXXXXXXX.tar.gz
shell> wget http://www.isi.edu/nsnam/dist/daily/otcl-XXXXXXXX.tar.gz
shell> wget http://www.isi.edu/nsnam/dist/daily/tclcl-XXXXXXXX.tar.gz
3. De-compress all file in custom directory (ex: ~/ns-daily-2.31/)
4. Recommand touch a file for the version of ns2
shell:~/ns-daily-2.31/> touch 20070815
5. Using following shell script to configure and make files
install.sh
[code]
#!/bin/bash
# tcl
cd tcl8.4.15/unix
./configure --enable-shared
make
cd ../..
# tk
cd tk8.4.15/unix
./configure --enable-shared
make
cd ../..
# otcl
cd otcl
./configure --disable-static --with-tcl-ver=8.4.15 --with-tk-ver=8.4.15
make
cd ..
# tclcl
cd tclcl
./configure --disable-static --with-tcl-ver=8.4.15 --with-tk-ver=8.4.15
make
cd ..
# ns-2
cd ns-2
./configure --disable-static --with-tcl-ver=8.4.15 --with-tk-ver=8.4.15 \
--with-otcl=../otcl --with-tclcl=../tclcl
make
cd ..
# nam-1
cd nam-1
./configure --disable-static --with-tcl-ver=8.4.15 --with-tk-ver=8.4.15 \
--with-otcl=../otcl --with-tclcl=../tclcl
make
cd ..
echo "Installation complete"
[/code]
If this fail, try Distribution Specific instructions
If this error for file pcap.h not existed, install libpcapX.X-dev
If this success, only needing to upgrade OTcl, TclCL, ns-2 and nam-1 in the future
6. Create soft link for needing files
shell:~/ns-daily-2.31/> mkdir bin
shell:~/ns-daily-2.31/> mkdir lib
shell:~/ns-daily-2.31/> cd bin
shell:~/ns-daily-2.31/bin/> ln -s ../ns-2/ns .
shell:~/ns-daily-2.31/bin/> ln -s ../nam-1/nam .
shell:~/ns-daily-2.31/bin/> cd ../lib/
shell:~/ns-daily-2.31/lib/> ln -s ../tcl8.4.15/unix/libtcl8.4.so .
shell:~/ns-daily-2.31/lib/> ln -s ../tk8.4.15/unix/libtk8.4.so .
7. Add following setting to set NS2 environment
.bashrc
[code]
# NS2 environment
PATH=/home/USER/ns-daily-2.31/bin:$PATH
LD_LIBRARY_PATH=/home/USER/ns-daily-2.31/bin:/home/USER/ns-daily-2.31/lib
TCL_LIBRARY=/home/USER/ns/ns-daily-2.31/tcl8.4.15/library
export PATH LD_LIBRARY_PATH TCL_LIBRARY
[/code]
8. Make Documentation
shell:~/ns-daily-2.31/ns-2/doc> make
If you want to create html documentation, install latex2html firstly
No comments:
Post a Comment