CentOS 使用 SpeedTest 测速 | 您所在的位置:网站首页 › 安装speedtest-cli › CentOS 使用 SpeedTest 测速 |
CentOS 使用 SpeedTest 测速
博主博客
https://blog.uso6.comhttps://blog.csdn.net/dxk539687357
一、测试本地是否安装 python(已安装可以跳过)
1.在命令行中输入rpm -qa | grep python36 判断是否已经安装 python3。 2.如果没有安装输入 yum install python36 进行安装。 二、测试 CentOS 到 Speed Test 的速度1.一键安装 speedtest-cli。 wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py2.给予 speedtest-cli 权限。 chmod +x speedtest-cli3.启动 speedtest-cli 进行测试。 ./speedtest-cli如果上面命令执行不了, 使用 python3 speedtest-cli 。 三、测试本机到 CentOS 的速度 yum install docker # 安装 docker 服务 systemctl start docker # 开启 docker 服务 systemctl enable docker # 设置 docker 服务开机启动 docker pull adolfintel/speedtest # 下载 docker speedtest 镜像 docker run --restart=always -d -p 8080:80 adolfintel/speedtest # 运行容器, 把容器 80 端口映射到主机 8080 端口 systemctl stop firewalld.service # 关闭 firewalld 防火墙服务 systemctl disable firewalld.service # 设置 firewalld 防火墙服务开机不启动输入上面命令安装 speedtest 测速服务后在浏览器地址栏输入http://服务器IP:8080 即可打开测速页面。 |
CopyRight 2018-2019 实验室设备网 版权所有 |