Git Product home page Git Product logo

iispeed's Introduction

iiSpeed

Prerequisite

Debian/Ubuntu users:

Step 1: sudo apt-get update && sudo apt-get upgrade -y

Step 2: sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-client mysql-server php5-mysql python-mysqldb -y

Step 3: sudo pip install speedtest-cli

CentOS 7 users:

Step 1: yum install httpd mariadb-server mariadb-libs php-mysql php-cli python2-pip -y

Step 2: systemctl enable httpd mariadb && systemctl start httpd mariadb

Step 3: Follow secure install guide for MariaDB here: https://mariadb.com/kb/en/mariadb/mysql_secure_installation/

MySQL

Step 1: mysql -h localhost -u root -p

CREATE DATABASE iiSpeed;  
CREATE USER 'iiSpeed'@'localhost' IDENTIFIED BY 'password'; 
GRANT ALL PRIVILEGES ON iiSpeed.* TO 'iiSpeed'@'localhost'; 
FLUSH PRIVILEGES;
USE iiSpeed;
CREATE TABLE data ( sample_date_utc bigint unsigned, ping decimal(8,3), downspeed decimal(12,6), upspeed decimal(12,6) );
QUIT;

speedtest-cli

Step 1: sudo mkdir /usr/local/sbin/iiSpeed && cp speedtest_cli.py /usr/local/sbin/iiSpeed/

Step 2: sudo chmod 775 /usr/local/sbin/iiSpeed/speedtest_cli.py

Step 3: sudo echo '*/20 * * * * root /usr/local/sbin/iiSpeed/speedtest_cli.py' > /etc/cron.d/iispeed_cron

Verify (Wait 1 hour)

Step 1: mysql -h localhost -u iiSpeed -p

USE iiSpeed;
SELECT * FROM data;
QUIT;

Webpage

Step 1: sudo mkdir /var/www/html/iispeed && mv index.php /var/www/html/iispeed/

Step 2: Copy your MySQL password for iiSpeed user: sudo vi /var/www/html/iispeed/index.php

iispeed's People

Contributors

gavineke avatar mty22 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

mty22 tdousset

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.