0276.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Host Your Own Internet Speed Tester With LibreSpeed</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="i12bretro,How To,Tutorial,Linux,Debian,LibreSpeed,Speed Test,Self-Hosted">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Host Your Own Internet Speed Tester With LibreSpeed">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Host Your Own Internet Speed Tester With LibreSpeed</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <h2>Basic Installation</h2>
  25. <ol>
  26. <li>Log into the Debian/Ubuntu device</li>
  27. <li>Run the following commands in a terminal:<br />
  28. <code class="codeBlock"># update repositories and install any available software updates<br />
  29. sudo apt&nbsp;update<br />
  30. sudo apt&nbsp;upgrade<br />
  31. # install Apache HTTPD, PHP and GIT<br />
  32. sudo apt&nbsp;install git apache2 php libapache2-mod-php<br />
  33. # clone the git repo<br />
  34. sudo git clone https://github.com/adolfintel/speedtest /var/www/html/speedtest<br />
  35. sudo cp /var/www/html/speedtest/example-singleServer-gauges.html /var/www/html/speedtest/index.html<br />
  36. # set the owner of the new speedtest directory to www-data<br />
  37. sudo chown -R www-data:www-data /var/www/html/speedtest</code></li>
  38. <li>Open a web browser and navigate to http://DNSorIP/speedtest</li>
  39. <li>The basic speed test functionality will be available, but it lacks the abillity to save and share speed test results. Let&#39;s add a database to enable those features</li>
  40. </ol>
  41. <h2>Optional Advanced Installation Steps</h2>
  42. <ol>
  43. <li>Continue the installation by running&nbsp;the following commands in a terminal:<br />
  44. <code class="codeBlock"># install MySQL/MariaDB<br />
  45. sudo apt&nbsp;install mariadb-server mariadb-client&nbsp;php-mysql<br />
  46. sudo su<br />
  47. mysql_secure_installation</code></li>
  48. <li>Press Enter to login as root</li>
  49. <li>Type Y and press Enter to set a root password, type the password twice to confirm</li>
  50. <li>Type Y and press Enter to remove anonymous users</li>
  51. <li>Type Y and press Enter to disallow root login remotely</li>
  52. <li>Type Y and press Enter to remove the test database</li>
  53. <li>Type Y and press Enter to reload privilege tables</li>
  54. <li>Run the following command to login into MySQL: <code class="codeBlock">mysql -u root -p</code></li>
  55. <li>Authenticate with the root password set earlier</li>
  56. <li>Run the following commands to create the speedtest database and database user <code class="codeBlock">MariaDB [(none)]&gt; CREATE DATABASE speedtest;<br />
  57. MariaDB [(none)]&gt; GRANT ALL ON speedtest.* to &#39;speedtest&#39;@&#39;localhost&#39; IDENTIFIED BY &#39;Sp33dTest!!&#39;;<br />
  58. MariaDB [(none)]&gt; FLUSH PRIVILEGES;<br />
  59. MariaDB [(none)]&gt; USE speedtest;<br />
  60. MariaDB [(none)]&gt;&nbsp;\. /var/www/html/speedtest/results/telemetry_mysql.sql<br />
  61. MariaDB [(none)]&gt; EXIT;<br />
  62. exit</code></li>
  63. <li>Continue with the following commands to setup the speedtest database<br />
  64. <code class="codeBlock"># edit telemetry_settings.php<br />
  65. sudo nano /var/www/html/speedtest/results/telemetry_settings.php</code></li>
  66. <li>Verify/change $db_type = &#39;mysql&#39;;</li>
  67. <li>Change $stats_password = &#39;P@$$w0rD&#39;;</li>
  68. <li>Change $enable_id_obfuscation = true;</li>
  69. <li>Update the Mysql Settings variables to the credentials created earlier
  70. <p>$MySql_username = &#39;speedtest&#39;;<br />
  71. $MySql_password = &#39;Sp33dTest!!&#39;;<br />
  72. $MySql_hostname = &#39;localhost&#39;;<br />
  73. $MySql_databasename = &#39;speedtest&#39;;</p>
  74. </li>
  75. <li>Press CTRL+O, Enter, CTRL+X to write the changes to telemetry_settings.php</li>
  76. <li>Continue with the following commands in terminal:<br />
  77. <code class="codeBlock"># copy an example page with telemetry enabled<br />
  78. sudo cp /var/www/html/speedtest/example-singleServer-full.html /var/www/html/speedtest/index.html<br />
  79. # restart the apache2 service to enable MySQL<br />
  80. sudo systemctl restart apache2</code></li>
  81. <li>Open a web browser and navigate to http://DNSorIP/speedtest</li>
  82. <li>This time around the speedtest results have been saved to the database and a link is provided to share the results</li>
  83. </ol>
  84. <p>More Info:&nbsp;<a href="https://github.com/librespeed/speedtest" target="_blank">https://github.com/librespeed/speedtest</a></p>
  85. </div>
  86. </div>
  87. </body>
  88. </html>