centos php github,在CentOS服务器上安装配置SpeedTest测速软件

本文讲述在CentOS 7服务器上安装配置SpeedTest测速软件。SpeedTest网站是全球范围的测速网站,一些大型的主机商都会使用它来测试速度。在某些时候,我们的服务器也要进行测试。当然要是在Linux桌面下可以使用speedtest-cli来达到目的。

1.安装Apache和PHP

首先登陆到云主机CentOS 7上,然后执行命令,安装Apache:

yum install httpd -y

接下来,安装相关的组件:

yum install php php-mysql php-gd php-mcrypt -y

2.下载SpeedTest Mini

目前SpeedTest Mini很难下载到,都是以前保存在电脑上下载过的,如果你没有下载过SpeedTest Mini的软件包在硬盘里,你可以通过SpeedTest Mini官方页面申请获得mini.zip包,当然还可以从网络搜索上下载mini.zip。

3.解压mini.zip

然后解压安装包,并放在apache的web目录下:

unzip mini.zip

mkdir -p /var/www/html

cp -rRfv mini /var/www/html/

4.执行完成上述命令后,我们来修改speedtest的代码文件

cd /var/www/html/mini

mv index-php.html index.html

5.启动Tomcat

执行命令,启动tomcat:

systemctl start httpd

6.访问测试页面

使用浏览器,打开服务器IP/mini页面,就可以看到SpeedTest的测试页面了:

24cafbeff3ec5140301c3bd326e694ed.png

附:在Linux终端中还可以使用speedtest-cli。安装方法:

1.pip / easy_install

pip install speedtest-cli

or

easy_install speedtest-cli

2.Github:

pip install git+https://github.com/sivel/speedtest-cli.git

or

git clone https://github.com/sivel/speedtest-cli.git

python speedtest-cli/setup.py install

3.Just download (Like the way it used to be):

wget -O speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

chmod +x speedtest-cli

or

curl -Lo speedtest-cli https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py

chmod +x speedtest-cli

speedtest-cli具体使用方法请参考如何在Linux的终端测试网速一文:https://ywnz.com/linuxjc/1371.html

相关主题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值