1. install vmware workstation 6. (I use VMware Workstation 6.0 绿色精简英文版（vmware专版）from http://www.vmware.com/cn/)
2. create a new vm for installing ubuntu.
3. download ubuntu-7.10-alternate-i386.iso from the Internet
4. install a basic commandline ubuntu system with the ubuntu iso in vmware 6.
5. sudo aptget install x-window-core xorg-dev libx11-dev gcc g++ make lftp
6. ftp download the ns-allinone-2.31 package from outside
(you can setup an ftpserver in your host machine)
I use NAT as the network connection in the vm. The vm size is about 1.0G.
I installed and verified the ns2.31 package in the vm. You can download it and use it on your local machine with:
to login in it and start your simulation.
ps: It is a minimal installation of ubuntu, without installing the window manager, such as xfce, gnome and kde. Sorry for that, because I didn't use nam for animation. The commandline interface is enough for me.