How To Install ns3 on linux ? [转]

本文详细介绍了如何在Linux系统上安装网络仿真软件NS3,并通过示例程序验证安装成功。从下载源码到构建测试,提供了完整的步骤指导。

转自: http://wirelesscafe.wordpress.com/2011/01/15/how-to-install-ns3-on-linux/

Happy New Year to all the readers. Its long, I have not posted any thing on this blog except comments :) . So, here, today we will see how to install ns3 on linux box. The home page of ns3 is NS3 Home

the current release is ns3.10 (January 5, 2011) and can be downloaded from DOWNLOAD NS3.10

Step 1: Download ns3.10 and save it some where , but on the same machine where you want to install (Just Kidding :) )

Step 2: open the terminal and go to the folder where ns3.10 tar file is.

Step 3: from the terminal run :

$tar -xvf ns-allinone-3.10.tar.bz2

$cd ns-allinone-3.10

$./build.py

you can provide some options to build.py but as a newbie use the default one :)

When the build process get over (it will take some time), type

$cd ns-3.10

and now we will validate our installation

$./test.py

the out put of this will be some thing like this:

Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’

Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’

‘build’ finished successfully (2.010s)

PASS: TestSuite lte-bearer

PASS: TestSuite lte-propagation-loss-model

PASS: TestSuite wimax-fragmentation

PASS: TestSuite lte-phy

…………..
PASS: Example examples/tcp/tcp-nsc-lfn
PASS: Example examples/wireless/wifi-ap.py
PASS: Example src/contrib/flow-monitor/examples/wifi-olsr-flowmon.py
168 of 168 tests passed (168 passed, 0 skipped, 0 failed, 0 crashed, 0 valgrind errors)

Step 4:  Now our ns3 is installed and ready to run sample programs.

right now we are in directory “ns-3.10″
from terminal :

 

$ cp examples/tutorial/first.cc scratch/myfirst.cc

$./waf
this time waf will give some thing like this:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (15.900s)

Step 5: now it is the time to run the simulation

$ ./waf –run myfirst
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (1.353s)
Sent 1024 bytes to 10.1.1.2
Received 1024 bytes from 10.1.1.1
Received 1024 bytes from 10.1.1.2
Congratulations !! NS3 is installed and running successfully.
Lets try some other example.
Again go to the terminal and type
$cp examples/wireless/ofdm-validation.cc scratch/myofdm.cc
$./waf
out put will be:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
[1330/1502] cxx: scratch/myofdm.cc -> build/debug/scratch/myofdm_2.o
[1500/1502] cxx_link: build/debug/scratch/myofdm_2.o -> build/debug/scratch/myofdm
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (5.842s)
now run the simulation:
$ ./waf –run myofdm
this time output will be:
Waf: Entering directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
Waf: Leaving directory `/media/Installations/ns-allinone-3.10/ns-3.10/build’
‘build’ finished successfully (1.448s)
OfdmRate6Mbps
OfdmRate9Mbps
OfdmRate12Mbps
OfdmRate18Mbps
OfdmRate24Mbps
OfdmRate36Mbps
OfdmRate48Mbps
OfdmRate54Mbps
So, this way you can try different examples, and get an introduction of ns3.
Note: As I am using Fedora 14 Complete Installation, I have not feel the need to resolve the dependencies, but if you will come across any error then please make me know, so that I will extend the post to cover the dependencies problems, and to other distributions also like ubuntu etc.

Enjoy Ns3 , soon, I will come back with tutorials on ns3 and dependencies resolution for ns3 (only if some will mention the errors ;) )

Ashwini Patankar for WirelessCafe !!


安装 Watt Toolkit(原名 Steam++)在 Linux 系统上通常可以通过编译源码或者使用预编译的二进制文件来完成。Watt Toolkit 是一个开源工具,主要用于加速 Steam 平台的下载速度,支持跨平台运行,因此在 Linux 上也能够很好地工作。 ### 安装步骤 #### 方法一:使用预编译的二进制文件 1. 访问 [Watt Toolkit 的 GitHub 仓库](https://github.com/BeyondDimension/SteamTools) 并下载适用于 Linux 的最新版本。 2. 解压下载的压缩包。 3. 给予可执行权限: ```bash chmod +x WattToolkit ``` 4. 运行程序: ```bash ./WattToolkit ``` #### 方法二:从源码编译 如果你希望从源码编译 Watt Toolkit,可以按照以下步骤操作: 1. 安装必要的依赖项。对于大多数 Linux 发行版,你需要安装 Qt 开发工具链和其他一些库: ```bash sudo apt update sudo apt install qt5-qmake qtbase5-dev qtdeclarative5-dev libqt5websockets5-dev libssl-dev ``` 2. 克隆仓库到本地: ```bash git clone https://github.com/BeyondDimension/SteamTools.git cd SteamTools ``` 3. 使用 qmake 构建项目: ```bash qmake make ``` 4. 编译完成后,运行生成的可执行文件: ```bash ./SteamTools ``` ### 配置与使用 安装完成后,你可以通过图形界面配置 Watt Toolkit 的各项功能,包括但不限于 CDN 代理、IP 拦截、日志查看等。根据个人需求启用相应的功能模块即可。 ### 注意事项 - 如果你在运行过程中遇到任何问题,建议查看项目的 [GitHub Issues 页面](https://github.com/BeyondDimension/SteamTools/issues),通常会有其他用户遇到类似问题并提供了相应的解决方案。 - 确保你的系统保持最新,以避免因依赖库版本过旧而导致的问题。 ---
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值