speedtest作为一款在线并且可视化的网速测试工具。使用方法简单,无需下载、安装多余软件,只需有浏览器即可。那如何搭建一个自己的web speedtest站点呢?
项目开源地址:https://github.com/adolfintel/speedtest
安装web,php,git程序,克隆speedtest代码,启动服务进行基础测试
yum install httpd php git -y
git clone https://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 cd /var/www/html/
cp ~/speedtest/example-singleServer-full.html index.html
+++
这样测试后的有记录,下面是登录网站,密码是上面($stats_password=”admin”;)中指定的
以上就是良许教程网为各位朋友分享的Linu系统相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多干货等着你 !