<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:1627421319 -2147483648 8 0 66047 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} p {mso-margin-top-alt:auto; margin-right:0cm; mso-margin-bottom-alt:auto; margin-left:0cm; mso-pagination:widow-orphan; font-size:12.0pt; font-family:宋体; mso-bidi-font-family:宋体;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:595.3pt 841.9pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:42.55pt; mso-footer-margin:49.6pt; mso-paper-source:0; layout-grid:15.6pt;} div.Section1 {page:Section1;} -->
ns-allinone-2.33 在 linux 中安装有点问题,于是重新下载了 ns-allinone-2.29
1. 在 home 下创建目录 ns2:
cd /cj/home
mkdir ns2
2. 进入共享文件夹,解压文件到虚拟 linux 中:
cd /mnt/hgfs/ns2
tar zxvf ns-allinone-2.29.tar.gz -C /home/cj/ns2
说明: -C 是切换目录的意思
3. 解压成功后,进入 ns-allinone-2.29 目录,按装
cd /home/cj/ns2/ ns-allinone-2.29
./install
4. 根据安装结束后结尾处的提示,将某些路径复制下来
5. 修改 /root/.bashrc (注意该文件为隐藏文件),在该文件末尾加上以下三句话:
export PATH= “ $PATH : /home/ns2/ns-allinone-2.29/bin : /home/ns2/ns-allinone-2.29/tcl8.4.18/unix : /home/ns2/ns-allinone-2.29/tk8.4.18/unix ”
export LD_LIBRARY_PATH=”$LD_LIBRARY_PATH : /home/ns2/ns-allinone-2.29/otcl-1.13 : /home/ns2/ns-allinone-2.29/lib”
export TCL_LIBRARY= “ /home/ns2/ns-allinone-2.29/tcl8.4.18/library”
6. 在 /root/ 下运行 source .bashrc 使重新获取环境变量设置。
7. 在根目录下运行 NS,
ns
若出现 % ,则表示安装成功。