-
Notifications
You must be signed in to change notification settings - Fork 257
Dustcloud Raspberry Pi Installation
Yky edited this page Mar 13, 2018
·
20 revisions
- echo 'deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi' >> /etc/apt/sources.list
- apt-get update && apt-get upgrade -y
- apt-get install apache2 php5 php5-mysqlnd mysql-server python3 python3-pip git
- sed -i -e 's/Listen 80/Listen 81/g' /etc/apache2/ports.conf
- sed -i -e 's/:80>/:81>/g' /etc/apache2/sites-enabled/000-default.conf
- pip3 install pymysql python-miio
- git clone --depth=1 https://github.com/dgiese/dustcloud.git
- cd dustcloud/dustcloud
- mysql -e "CREATE USER 'dustcloud'@'localhost' IDENTIFIED by 'dustcloudpw';"
- mysql -e "GRANT USAGE ON *.* TO 'dustcloud'@'localhost';"
- mysql -e "CREATE DATABASE IF NOT EXISTS `dustcloud`;"
- mysql -e "GRANT ALL PRIVILEGES ON `dustcloud`.* TO 'dustcloud'@'localhost';"
- cat dustcloud.sql | mysql dustcloud
- mkdir /var/www/html/dustcloud
- cp www/* /var/www/html/dustcloud/
- mv /var/www/html/dustcloud/config.php.dist /var/www/html/dustcloud/config.php
- sed -i -e 's/user123/dustcloud/g' /var/www/html/dustcloud/config.php
- sed -i -e "s/const DB_PASS = ''/const DB_PASS = 'dustcloudpw'/g" /var/www/html/dustcloud/config.php
- sed -i -e 's/pymysql.connect("localhost","dustcloud","","dustcloud")/pymysql.connect("localhost","dustcloud","dustcloudpw","dustcloud")/g' server.py
- sed -i -e 's/my_cloudserver_ip = "10.0.0.1"/my_cloudserver_ip = "123.123.123.123"/g' server.py
- chmod +x server.sh
- mkdir /dustcloud
- cp server.* /dustcloud/
- setcap CAP_NET_BIND_SERVICE=+eip /usr/bin/python3.5
Navigation
- Home
- Vacuum Robots
- Lumi Aqara Camera (experimental)
- Lumi Aqara Gateway (new Version, without Homekit)
- Documentation
- Dustcloud