1 Star 0 Fork 355

天象聚合云 / myems

forked from MyEMS / MyEMS能源管理系统 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
Guangyu Zhang 提交于 2021-03-31 12:30 . updated README

MyEMS Aggregation Service 数据汇总服务

Introduction

This service is a component of MyEMS and it aggregates normalized data up to multiple dimensions.

Prerequisites

mysql.connector

Installation

Download and install MySQL Connector:

    $ cd ~/tools
    $ wget https://dev.mysql.com/get/Downloads/Connector-Python/mysql-connector-python-8.0.20.tar.gz
    $ tar xzf mysql-connector-python-8.0.20.tar.gz
    $ cd ~/tools/mysql-connector-python-8.0.20
    $ sudo python3 setup.py install

Install myems-aggregation service:

    $ cd ~
    $ git clone https://github.com/MyEMS/myems.git
    $ cd myems
    $ sudo git checkout master (or the latest release tag)
    $ sudo cp -R ~/myems/myems-aggregation /myems-aggregation

Edit config.py

    $ sudo nano /myems-aggregation/config.py

Setup systemd service:

    $ sudo cp myems-aggregation.service /lib/systemd/system/

Enable the service:

    $ sudo systemctl enable myems-aggregation.service

Start the service:

    $ sudo systemctl start myems-aggregation.service

Monitor the service:

    $ sudo systemctl status myems-aggregation.service

View the log:

    $ cat /myems-aggregation.log

References

[1]. https://myems.io

[2]. https://dev.mysql.com/doc/connector-python/en/

1
https://gitee.com/juyunapp_admin/myems.git
git@gitee.com:juyunapp_admin/myems.git
juyunapp_admin
myems
myems
master

搜索帮助