红联Linux门户
Linux帮助

在VMware下的Ubuntu7.04中安装NS2

发布时间:2007-05-14 00:52:10来源:红联作者:Vegetable
Windows XP SP2 + VMware6.0.0 + Ubuntu7.04 + VM tools + NS-allinone-2.31

1. Install VMware6.0.0

2. Start new virtual machine and install Ubuntu7.04 using “ubuntu-7.04-desktop-i386.iso”


Install VM tools------------------------------------------------------------------------------------------------------------

3. Select VM -> Install VMware tools VMware6.0.0 in the Menu of VMware6.0.0 and Extract “VMware-linux-tools.tar.gz” to “Desktop”

4. Select Applications -> Accessories -> Terminal in the Menu of Ubuntu7.04,

write “sudo -i” to use root,

cd vmware-tools-disturb

./vmware-install.pl

(if you don’t know how to config it, select default by using ‘Enter’ key)

5. Select System -> Administration -> Update manager in the Menu of Ubuntu7.04

Install update

6. Select Edit -> Preferences in the Menu of VMware6.0.0 and make sure “Enable all shared folders by default” is selected.

7. Select VM -> Settings in the Menu of VMware6.0.0 and turn to the “option” tab, select shared folders and make sure Folder sharing select “Always enabled” and Add a “Folders”

Now you can copy the “ns-allinone-2.31.tar.gz” to the shared folder.

You can see it in the /mnt/hgfs in the filesystem of Ubuntu7.04.

Copy “ns-allinone-2.31.tar.gz” to /home/”your username”



Install NS2-------------------------------------------------------------------------------------------------------------------

8. Select Applications -> Accessories -> Terminal in the Menu of Ubuntu7.04,

write “sudo -i” to use root,

apt-get install build-essential

(for gcc and some essential)

apt-get install tcl8.4 tcl84.-dev tk8.4 tk8.4-dev

(for tcl and tk)

apt-get install libxmu-dev

(for nam)

9. Select Applications -> Accessories -> Terminal in the Menu of Ubuntu7.04,

write “sudo -i” to use root,

cd /home/”your username”

tar xvfz ns-allinone-2.31.tar.gz

(Extract ns-allinone-2.31.tar.gz)

cd ns-allinone-2.31

./install

(install ns-allinone-2.31)

10. Waiting for its end.

cd ..

gedit .bashrc

write below and save

export PATH=$PATH:/home/”your username”/ns-allinone-2.31/bin:/home/”your username”/ns-allinone-2.31/tcl8.4.14/unix:/home/”your username”/ns-allinone-2.31/tk8.4.14/unix

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/”your username”/ns-allinone-2.31/otcl-1.13:/home/”your username”/ns-allinone-2.31/lib

export TCL_LIBRARY=$TCL_LIBRARY:/home/”your username”/ns-allinone-2.31/tcl8.4.14/library

Now you should log-out Ubuntu to reload “environment variables”

11. cd ns-2.31

./validate

(validate install)

validate overall report: all tests passed

12. sudo apt-get install gawk

(for gawk)

13. sudo apt-get install gnuplot

(for gnuplot)

14. If you want use “Xgraph” you should add PATH to LD_LIBRARY_PATH:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: $PATH :/home/”your username”/ns-allinone-2.31/otcl-1.13:/home/”your username”/ns-allinone-2.31/lib

Now you should log-out Ubuntu to reload “environment variables”
文章评论

共有 18 条评论

  1. 82.158.2.* 于 2007-07-18 15:41:20发表:

    http://36ca825687dd9cc9a382c20c67d14f14-t.xkktxb.org 36ca825687dd9cc9a382c20c67d14f14 http://36ca825687dd9cc9a382c20c67d14f14-b1.xkktxb.org 36ca825687dd9cc9a382c20c67d14f14 http://36ca825687dd9cc9a382c20c67d14f14-b3.xkktxb.org 8d1f2bfe3cbc5359328d95464cab8b7c

  2. 201.235.42.* 于 2007-07-06 00:41:42发表:

    http://8fb1b6bd1b4cfeb84d9f6fbcc4c9a5fe-t.lwgmrw.org 8fb1b6bd1b4cfeb84d9f6fbcc4c9a5fe http://8fb1b6bd1b4cfeb84d9f6fbcc4c9a5fe-b1.lwgmrw.org 8fb1b6bd1b4cfeb84d9f6fbcc4c9a5fe http://8fb1b6bd1b4cfeb84d9f6fbcc4c9a5fe-b3.lwgmrw.org 7323937625928ec2c2b389a5c949efe8