WHAT IS MTR?
===
mtr combines the functionality of the 'traceroute' and 'ping' programs
in a single network diagnostic tool.
As mtr starts, it investigates the network connection between the host
mtr runs on and a user-specified destination host. After it
determines the address of each network hop between the machines,
it sends a sequence of ICMP ECHO requests to each one to determine the
quality of the link to each machine. As it does this, it prints
running statistics about each machine.
mtr is distributed under the GNU General Public License version 2.
See the COPYING file for details.
INSTALLING
===
If you're building this from a tarball, compiling mtr is as
simple as:
./configure && make
Please note that this refers to the tarballs from
https://www.bitwizard.nl/mtr/files/
and not the tarballs that github can produce.
(in the past, there was a Makefile in the distribution that did
the `./configure` for you and then ran make again with the generated
Makefile, but this has suffered some bitrot. It didn't work well
with git.)
If you're building from the git repository, you'll need to run:
./bootstrap.sh && ./configure && make
When it looks as if the compilation was successful, you can
test mtr with
sudo ./mtr <host>
(fill in a hostname or IP address where it says <host>) or
immediately continue on to installing:
make install
Note that mtr-packet must be suid-root because it requires access to
raw IP sockets. See SECURITY for security information.
Older versions used to require a non-existent path to GTK for a
correct build of a non-gtk version while GTK was installed. This is
no longer necessary. `./configure --without-gtk` should now work.
If it doesn't, try `make WITHOUT_X11=YES` as the make step.
On Solaris, you'll need to use GNU make to build.
(Use `gmake` rather than `make`.)
On Solaris (and possibly other systems) the "gtk" library may be
installed in a directory where the dynamic linker refuses to look when
a binary is setuid. Roman Shterenzon reports that adding
-Wl,-rpath=/usr/lib
to the commandline will work if you are using gnu LD. He tells me that
you're out of luck when you use the sun LD. That's not quite true, as
you can move the gtk libraries to `/usr/lib` instead of leaving them in
`/usr/local/lib`. (when the ld tells you that `/usr/local/lib` is untrusted
and `/usr/lib` is trusted, and you trust the gtk libs enough to want them
in a setuid program, then there is something to say for moving them
to the "trusted" directory.)
Building on MacOS should not require any special steps.
BUILDING FOR WINDOWS
===
Building for Windows requires Cygwin. To obtain Cygwin, see
https://cygwin.com/install.html.
Next, re-run cygwin's `setup-x86.exe` (or `setup-x86_64.exe` if you're using 64bit cygwin) with the following arguments,
which will install the packages required for building:
setup-x86.exe --package-manager --wait --packages automake,pkg-config,make,gcc-core,libncurses-devel,libjansson-devel
Build as under Unix:
./bootstrap.sh && ./configure && make
Finally, install the built binaries:
make install
WHERE CAN I GET THE LATEST VERSION OR MORE INFORMATION?
===
mtr is now hosted on github.
https://github.com/traviscross/mtr
See the mtr web page at http://www.BitWizard.nl/mtr/
Bug reports and feature requests should be submitted to the Github bug tracking system.
Patches can be submitted by cloning the Github repository and issuing
a pull request, or by email to me. Please use unified diffs. Usually
the diff is sort of messy, so please check that the diff is clean and
doesn't contain too much of your local stuff (for example, I don't
want/need the "configure" script that /your/ automake made for you).
(There used to be a mailinglist, but all it got was spam. So
when the server was upgraded, the mailing list died.)
REW
编译安装mtr 0.95版本
需积分: 0 15 浏览量
更新于2024-03-04
收藏 141KB GZ 举报
**编译安装mtr 0.95版本详解**
mtr是一款非常实用的网络诊断工具,结合了traceroute和ping的功能,能够实时显示数据包在网络中的传输情况,帮助用户识别和定位网络延迟或丢包的问题。本文将详细介绍如何从源码编译安装mtr 0.95版本。
你需要在本地计算机上准备以下基本环境:
1. **操作系统**:确保你的系统是Linux或者类UNIX环境,因为mtr主要设计用于这些平台。
2. **编译工具**:确保你有C编译器,如GCC,以及Make工具已经安装。
3. **依赖库**:mtr的编译可能需要一些库,比如libpcap用于网络数据包捕获,libgtk用于图形界面(如果需要GUI版本)等。具体依赖将在编译过程中查看`./configure`输出或查阅官方文档。
接下来,我们按照以下步骤进行操作:
1. **下载源码**:你可以从GitHub或其他源获取mtr 0.95的源代码。如果无法直接访问GitHub,可以找到其他镜像站点或使用离线包`mtr-0.95.tar.gz`。
2. **解压源码**:
```
tar -zxvf mtr-0.95.tar.gz
cd mtr-0.95
```
3. **配置编译环境**:
在源码目录下运行`./configure`脚本,该脚本会检查系统环境并确定必要的编译选项。你可以通过附加参数来指定特定的配置,例如:
```
./configure --prefix=/usr/local --enable-gtk2
```
上述命令会将mtr安装到`/usr/local`目录,并启用GTK2图形界面。如果你只需要命令行版本,可以省略`--enable-gtk2`。
4. **编译源码**:
如果`./configure`成功执行,你可以通过运行`make`命令来编译源代码。这将会调用Makefile文件,根据配置信息编译源代码。
```
make
```
5. **测试编译结果**:
编译完成后,你可以运行`make check`来进行测试,确保mtr功能正常。
```
make check
```
6. **安装**:
如果测试没有问题,使用`make install`命令将编译好的mtr安装到系统中。
```
sudo make install
```
7. **更新可执行文件路径**:
如果你在`./configure`时指定了非默认的安装路径,可能需要将mtr的可执行文件路径添加到`$PATH`环境变量中,以便在任何目录下都能直接运行mtr。
8. **验证安装**:
你可以通过运行`mtr`或`mtr-gtk`(如果启用了图形界面)来验证安装是否成功。
注意:在某些系统中,如Ubuntu、Debian等,可能还需要安装一些额外的开发库才能编译成功,例如`libpcap-dev`和`libgtk2.0-dev`。在编译前,可以使用`apt-get install`或`apt install`命令安装这些库。
总结来说,编译安装mtr 0.95版本涉及下载源码、解压、配置编译选项、编译、测试、安装和验证等一系列步骤。通过这个过程,你不仅能够获得最新版本的mtr,还能更好地理解软件的构建过程和系统依赖关系。

知者不知
- 粉丝: 89
最新资源
- 高级人工智能-5.pptx
- 【河北省】专业技术人员标准化的理论方法与实践试卷4答案.doc
- 工程报验申请表.doc
- 基于STC89C52单片机-红外智能循迹小车(同名9240).doc
- 深度强化学习各算法详解及 Pytorch 实现方法 深度强化学习各类算法介绍与 Pytorch 实现方式 深度强化学习各算法的介绍及 Pytorch 实现详解 深度强化学习不同算法介绍与 Pytorc
- 实验幼儿园儿童园内饮食记录表.doc
- 公司物流服务方案.doc
- 小学英语人称代词表格总结.doc
- 移位指令SFTPPT课件.ppt
- 计量经济学-四元线性回归模型案例分析.doc
- 计算机专业假期社会实践报告范文.docx
- 天天讲安全表格.doc
- 公司信用管理总结.doc
- 民营企业高管绩效考核研究.doc
- 教师网络远程培训心得体会四篇.doc
- 水果拼盘店创业计划书.docx