导读 | speedtest作为一款在线并且可视化的网速测试工具。使用方法简单,无需下载、安装多余软件,只需有浏览器即可。那如何搭建一个自己的web speedtest站点呢? |
项目开源地址://github.com/adolfintel/speedtest
安装web,php,git程序,克隆speedtest代码,启动服务进行基础测试
yum install httpd php git -y git clone //github.com/adolfintel/speedtest.git cd speedtest/ cp -R backend/ example-singleServer-pretty.html *.js /var/www/html/ cd /var/www/html/ mv example-singleServer-pretty.html index.html chown -R apache * #更改当前的目录所属主 systemctl start httpd http:/hostip #访问主机ip就可以测速了
安装数据库,导入数据,将测试的结果保存以便后续查询
+++++++++++ cd /root/speedtest/ cp -R results/ /var/www/html/ cd /var/www/html/ chown -R apache * cd /var/www/html/results/ yum install mariadb-server -y systemctl start mariadb mysql_secure_installation mysql -uroot -p create database speedtest; exit; +++ vi telemetry_settings.php $stats_password="admin"; //password to login to stats.php. Change this!!! $enable_id_obfuscation=true; //if set to true, test IDs will be obfuscated to prevent users from guessing URLs of other tests // Mysql settings $MySql_username="root"; $MySql_password="12456"; $MySql_hostname="localhost"; $MySql_databasename="speedtest"; ++++++++++++++++++++++++++++++++++++++++++++ mysql -uroot -p speedtest < telemetry_mysql.sql cd /var/www/html/ cp ~/speedtest/example-singleServer-full.html index.html +++
这样测试后的有记录,下面是登录网站,密码是上面($stats_password="admin";)中指定的
原文来自:
本文地址://gulass.cn/web-speedtest.html编辑:向金平,审核员:逄增宝
Linux大全:
Linux系统大全: