-
Notifications
You must be signed in to change notification settings - Fork 121
Manual Installation
The following has been tested on a fresh installation of Ubuntu.
This program has some dependencies, to install them you need to run the following:
sudo apt update
sudo apt install php-common php7.3 php7.3-cli php7.3-common php7.3-json php7.3-opcache php7.3-readline php-xml php-sqlite3 php-zip php-mbstring composer python3 python3-pip git
sudo apt install curl
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install nodejs
Then, download the code by running:
git clone https://github.com/henrywhitaker3/Speedtest-Tracker.git
Now you need to download Ookla's speedtest binary for your system from here. For a x86_64 system:
wget https://bintray.com/ookla/download/download_file?file_path=ookla-speedtest-1.0.0-x86_64-linux.tgz -O speedtest.tgz
tar zxvf speedtest.tgz
mv speedtest Speedtest-Tracker/app/Bin/
Install the composer and npm dependencies:
composer install
npm install && npm run production
Run the following to set your database variables:
cp .env.example .env
Then update the DB_DATABASE
value with the absolute path of your install, followed by /database/speed.db
.
Finally, run the following to setup the tables in the database:
php artisan key:generate
php artisan migrate
Now you need to accept Ookla's EULA by running:
php artisan speedtest:eula
Now run the following to make sure everything has been setup properly (it should output a speedtest result):
php artisan speedtest:run
To get speed test results every hour, you need to add a cronjob, run sudo crontab -e
and add an entry with the following (with the path you your install):
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
sudo vim /etc/systemd/system/speedtest.service
Add the following, updating the command
and user values
:
[Unit]
Description=Runs and keeps alive the artisan queue:work process
OnFailure=failure-notify@%n.service
[Service]
User=root
Restart=always
WorkingDirectory=/home/henry/Speedtest-Tracker
ExecStart=/usr/bin/php artisan queue:work
[Install]
WantedBy=default.target
Then run:
sudo systemctl daemon-reload
sudo systemctl enable speedtest.service
sudo systemctl start speedtest.service