-
Notifications
You must be signed in to change notification settings - Fork 257
Dustcloud Installation
Achilleas Pipinellis edited this page Jan 16, 2020
·
26 revisions
See Preparations on the Vacuum Robots
- MySQL/MariaDB Database server
- Webserver with PHP
- php-mysqli
- Python3
- python-miio
- composer (Dependency Manager for PHP)
-
We assume that we want to install dustcloud to
/opt
and that it should not run as root:apt update apt install git git clone --depth=1 https://github.com/dgiese/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 python3-pymysql python3-bottle cp docker/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 | mysql dustcloud -D dustcloud -p chown www-data:www-data /opt/dustcloud/www/cache pip3 install python-miio
-
Edit
/etc/apache2/ports.conf
and changeListen 80
toListen 2080
. -
Edit
/etc/apache2/sites-enables/000-default.conf
and change:80
to:2080
. -
Set up the firewall rules:
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
</Directory>
Navigation
- Home
- Vacuum Robots
- Lumi Aqara Camera (experimental)
- Lumi Aqara Gateway (new Version, without Homekit)
- Documentation
- Dustcloud