speedtest

这篇博客介绍了如何在Linux环境中安装Apache2、PHP,然后通过Git克隆speedtest项目,并将结果页面部署到Apache服务器。同时,教程还涉及了SSL证书的安装和MySQL服务器的配置,包括创建数据库、设置root用户密码以及安装phpmyadmin。
摘要由CSDN通过智能技术生成

sudo apt install apache2 php
安装git
https://blog.csdn.net/weixin_43997319/article/details/125245168
// SSL CA cert
sudo apt-get install --reinstall ca-certificates

//克隆项目
git clone https://github.com/adolfintel/speedtest.git

cd speedtest/speedtest
sudo cp -R backend example-singleServer-pretty.html *.js /var/www/html/

cd ‘/var/www/html’
ls -la

sudo mv example-singleServer-pretty.html index.html

sudo chown -R www-data *

打开浏览器输入localhost

cd speedtest/speedtest
sudo cp -R results/ /var/www/html/

cd ‘/var/www/html’
sudo chown -R www-data *
cd results/
ls -al

sudo apt install mysql-server

sudo apt install phpmyadmin

sudo mysql
alter user ‘root’@‘localhost’ identified with mysql_native_password by ‘admin’;
flush privileges;
exit

sudo gedit telemetry_settings.php

<?php // Type of db: "mysql", "sqlite" or "postgresql" $db_type = 'mysql'; // Password to login to stats.php. Change this!!! $stats_password = 'pass123'; // If set to true, test IDs will be obfuscated to prevent users from guessing URLs of other tests $enable_id_obfuscation = true; // If set to true, IP addresses will be redacted from IP and ISP info fields, as well as the log $redact_ip_addresses = false; // Sqlite3 settings $Sqlite_db_file = '../../speedtest_telemetry.sql'; // Mysql settings $MySql_username = 'root'; $MySql_password = 'admin'; $MySql_hostname = 'localhost'; $MySql_databasename = 'speedtest'; $MySql_port = '3306'; // Postgresql settings $PostgreSql_username = 'USERNAME'; $PostgreSql_password = 'PASSWORD'; $PostgreSql_hostname = 'DB_HOSTNAME'; $PostgreSql_databasename = 'DB_NAME'; sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin 浏览器打开http://localhost/phpmyadmin 打不开网页的话 sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin 参考 https://www.shuzhiduo.com/A/WpdKvl6o5V/ 浏览器打开http://localhost/phpmyadmin输入账号root 密码admin 创建speedtest数据库 引入数据库speedtest/speedtest/results/telemetry_mysql.sql sudo cp /speedtest/speedtest/example-singleServer-full.html index.html
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值