Install NS2.

Source: Internet
Author: User
On the Linux platform, choose "ns2-installation"> "Linux Enterprise Application"> "Linux server application". For details, refer to the following section. 1. It is recommended to download ns-allinone-2.31 (latest package ):

Enter:
Wget http://nchc.dl.sourceforge.net/s... llinone-2.31.tar.gz

The ns-allinone-2.31 will automatically start downloading when you press enter (you may need to enter the user password)

2. After the download is completed, enter:
Tar-xzvf ns-allinone-2.31.tar.gz (command is used to extract the ns-allinone-2.31.tar.gz)

3. Input
Cd ns-allinone-2.31

4. Input
Sudo apt-get install build-essential autoconf automake libxmu-dev

5. Enter
./Install (. cannot be omitted)
When you see an image, the installation is successful and the window is closed.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // response); ">

6. Set Environment Variables

Enter:
Gedit ~ /. Bashrc

Press enter to open the. bashrc file.

Copy the following code and add it to the end of the. bashrc file. Note: Replace the "username" in the following code with your actual user name, and the version number must be consistent with the actual one (for example, tcl8.4.14 and tk8.4.14). You can enter: /home/username/ns-allinone-2.31/folder to view, if installed ns-allinone-2.31, do not change the version.

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

Export TCL_LIBRARY = $ TCL_LIBRARY:/home/username/ns-allinone-2.31/tcl8.4.14/library

Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/home/username/ns-allinone-2.31/otcl-1.13:/home/username/ns-allinone-2.31/lib

7. After completing the preceding steps, open a terminal and enter source ~ in the terminal ~ /. Bashrc

8. Enter "%" in the terminal. If "ns" is displayed, the installation is successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.