Skip to content

Dustcloud tsia installation (WIP)

Dennis Giese edited this page Oct 18, 2018 · 3 revisions

This commands work make Tsia's pull request work under a clean Ubuntu 16.04. We assume that we want to install dustcloud to /opt and that it should not run as root.

apt install git
git clone https://github.com/tsia/dustcloud.git
mv dustcloud/dustcloud /opt/
apt install apache2 mysql-server php7.0-zip composer libapache2-mod-php7.0 php7.0-mysql python3-pip virtualenv python3-mysql python3-cryptography python3-pil php7.0-curl
cp /opt/sysconfigs/apache2/conf/dustcloud.conf /etc/apache2/conf-enabled/
cd /opt/dustcloud/www
composer install
cp /opt/dustcloud/config.sample.ini /opt/dustcloud/config.ini
cat /opt/dustcloud/setup.sql | mysql -p
cat /opt/dustcloud/dustcloud.sql | dustcloud -D dustcloud -p
chown www-data:www-data /opt/dustcloud/www/cache
pip3 install python-miio


Edit /etc/apache2/ports.conf
change Listen 80 to Listen 2080
Edit /etc/apache2/sites-enables/000-default.conf
change :80 to :2080


sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 1080
su -c "python3 /opt/dustcloud/server.py --enable-live-map --http-proxy localhost:2080 -sport 1080" -s /bin/sh - www-data


Content of setup.sql
CREATE USER 'dustcloud'@'localhost' IDENTIFIED by 'dustcloud';
GRANT USAGE ON . TO 'dustcloud'@'localhost';
CREATE DATABASE IF NOT EXISTS dustcloud;
GRANT ALL PRIVILEGES ON dustcloud.* TO 'dustcloud'@'localhost';

Content of dustcloud.conf Alias /dustcloud /opt/dustcloud/www/public

<Directory /opt/dustcloud/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Require all granted