-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL
38 lines (31 loc) · 1.3 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
install the following perl modules (Debian / Raspbian)
# basic
apt-get install libdevice-serialport-perl liblog-log4perl-perl
# MySQL support
apt-get install libdbi-perl libdbd-mysql-perl libdbd-mysql
# Graphite support
apt-get install libwww-perl
# MySQL
CREATE DATABASE `easymeter` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */
CREATE TABLE `easymeter_data` (
`createDate` datetime NOT NULL,
`ownershipNumber` int(11) NOT NULL DEFAULT '0',
`importCounter` decimal(10,4) DEFAULT NULL,
`exportCounter` decimal(10,4) DEFAULT NULL,
`powerL1` decimal(6,2) DEFAULT NULL,
`powerL2` decimal(6,2) DEFAULT NULL,
`powerL3` decimal(6,2) DEFAULT NULL,
`powerOverall` decimal(6,2) DEFAULT NULL,
`state` smallint(6) DEFAULT NULL,
`serialNumber` char(15) COLLATE utf8_bin DEFAULT NULL,
`consumption` smallint(6) DEFAULT NULL,
`generation` smallint(6) DEFAULT NULL,
`export` smallint(6) DEFAULT NULL,
PRIMARY KEY (`ownershipNumber`,`createDate`),
KEY `idx_easymeter_data_createDate` (`createDate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
GRANT SELECT, INSERT ON easymeter.* TO [email protected] IDENTIFIED BY 'aivoTiRahquaeQuohpha8Ing';
# InfluxDB
CREATE DATABASE easymeter;
CREATE USER easymeter WITH PASSWORD 'Gumumeb0foo5keiwei7mooBa';
GRANT ALL ON easymeter TO easymeter;