Installing iperf on CentOS
Installing iperf on CentOS
天马行空的鱼 发表于1个月前
Installing iperf on CentOS
  • 发表于 1个月前
  • 阅读 6
  • 收藏 0
  • 点赞 0
  • 评论 0

腾讯云 十分钟定制你的第一个小程序>>>   

I ran yum install iperf to install the network bandwidth test tool Iperf on a CentOS 7 system, but was informed "No package iperf available."

When I checked the package repositories that were in use on another system that had iperf installed by using the command yum repolist, I found the following:

When I checked the repository that had been used for the installation of Iperf on that other system, I saw it was the epel repository.

You can use yum provides pkgname or yum whatprovides pkgname to see package information for pkgname and also the repository from which the package was obtained.

When I checked the repositories in use on the system where yum install iperf did not install iperf, I found it had only the default repositories and did not have the epel repository.

The Extra Packages for Enterprise Linux (EPEL) is a "community approved" repository, which is listed on the CentOS wiki under Available Repositories for Linux, which notes that though community repositories are not associated with the CentOS project, that "These repositories are frequently recommended by the community, are usually well maintained, and provide a substantial number of additional packages to CentOS." The wiki also notes:

Extra Packages for Enterprise Linux (EPEL) - (See provides rebuilds of Fedora packages for EL5, EL6 and EL7. Packages should not replace base, although there have been issues around point releases in the past. You can install EPEL by running yum install epel-release. The epel-release package is included in the CentOS Extras repository that is enabled by default. Support available on Freenode in #epel, on mailing lists, and its issue tracker.

On the system where the EPEL repo was in use, I found the following in /etc/yum.repos.d:

The system where the EPEL repository wasn't used had only the following files in the same directory:

I installed the EPEL repository on that system with yum install epel-release. I was then able to install iperf on that system with yum install iperf and was then able to run iperf in server mode on the system.

I ran iperf -c on another system to use iperf on the other system in client mode to test the bandwidth between the two systems. On the server end, i.e., the system where I just installed iperf and ran the iperf -s command, I saw the following:

You may have to create a firewall rule on the system functioning as an iperf server. For CentOS 7 systems, the default firewall software is firewalld. The default port used by iperf is 5001, so you will need to open that port in the firewall for both UDP and TCP, if you wish to use both protocols.

共有 人打赏支持
粉丝 9
博文 51
码字总数 31978
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
* 支付类型