updated installation guide in README
parent
d3ca99e516
commit
db1b32b4f9
|
@ -92,13 +92,9 @@ docker load --input .\myems-aggregation.tar
|
||||||
In this section, you will install myems-aggregation on Ubuntu Server with internet access.
|
In this section, you will install myems-aggregation on Ubuntu Server with internet access.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~
|
cp -r myems/myems-aggregation /myems-aggregation
|
||||||
git clone https://github.com/MyEMS/myems.git
|
cd /myems-aggregation
|
||||||
cd myems
|
|
||||||
git checkout master (or the latest release tag)
|
|
||||||
cd myems-aggregation
|
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
cp -r ~/myems/myems-aggregation /myems-aggregation
|
|
||||||
```
|
```
|
||||||
Copy exmaple.env file to .env and modify the .env file:
|
Copy exmaple.env file to .env and modify the .env file:
|
||||||
```bash
|
```bash
|
||||||
|
@ -151,9 +147,8 @@ python3 setup.py install
|
||||||
|
|
||||||
Install myems-aggregation service:
|
Install myems-aggregation service:
|
||||||
```bash
|
```bash
|
||||||
cd ~/myems
|
cp -r myems/myems-aggregation /myems-aggregation
|
||||||
git checkout master (or the latest release tag)
|
cd /myems-aggregation
|
||||||
cp -r ~/myems/myems-aggregation /myems-aggregation
|
|
||||||
```
|
```
|
||||||
Copy exmaple.env file to .env and modify the .env file:
|
Copy exmaple.env file to .env and modify the .env file:
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -111,13 +111,13 @@ docker load --input .\myems-api.tar
|
||||||
In this section, you will online install myems-api on Ubuntu Server with internet access.
|
In this section, you will online install myems-api on Ubuntu Server with internet access.
|
||||||
* Copy source code to a production Ubuntu Server and then install tools
|
* Copy source code to a production Ubuntu Server and then install tools
|
||||||
```bash
|
```bash
|
||||||
cd ~/myems/myems-api
|
cd myems/myems-api
|
||||||
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
||||||
```
|
```
|
||||||
|
|
||||||
* Install myems-api service:
|
* Install myems-api service:
|
||||||
```bash
|
```bash
|
||||||
cp -r ~/myems/myems-api /myems-api
|
cp -r myems/myems-api /myems-api
|
||||||
```
|
```
|
||||||
Create .env file based on example.env and edit the .env file if needed:
|
Create .env file based on example.env and edit the .env file if needed:
|
||||||
```bash
|
```bash
|
||||||
|
@ -215,7 +215,7 @@ python setup.py install
|
||||||
|
|
||||||
* Install myems-api service:
|
* Install myems-api service:
|
||||||
```bash
|
```bash
|
||||||
cp -r ~/myems/myems-api /myems-api
|
cp -r myems/myems-api /myems-api
|
||||||
```
|
```
|
||||||
Create .env file based on example.env and edit the .env file if needed:
|
Create .env file based on example.env and edit the .env file if needed:
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -86,7 +86,43 @@ docker save --output myems-cleaning.tar myems/myems-cleaning
|
||||||
docker load --input .\myems-cleaning.tar
|
docker load --input .\myems-cleaning.tar
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option 2: Install myems-cleaning on Ubuntu Server (bare-metal or virtual machine)
|
### Installation Option 2: Online install on Ubuntu server with internet access
|
||||||
|
|
||||||
|
In this section, you will install myems-cleaning on Ubuntu Server with internet access.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp -r myems-cleaning /myems-cleaning
|
||||||
|
cd /myems/myems-cleaning
|
||||||
|
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy exmaple.env file to .env and modify the .env file:
|
||||||
|
```bash
|
||||||
|
cp /myems-cleaning/example.env /myems-cleaning/.env
|
||||||
|
nano /myems-cleaning/.env
|
||||||
|
```
|
||||||
|
Setup systemd service:
|
||||||
|
```bash
|
||||||
|
cp myems-cleaning.service /lib/systemd/system/
|
||||||
|
```
|
||||||
|
Enable the service:
|
||||||
|
```bash
|
||||||
|
systemctl enable myems-cleaning.service
|
||||||
|
```
|
||||||
|
Start the service:
|
||||||
|
```bash
|
||||||
|
systemctl start myems-cleaning.service
|
||||||
|
```
|
||||||
|
Monitor the service:
|
||||||
|
```bash
|
||||||
|
systemctl status myems-cleaning.service
|
||||||
|
```
|
||||||
|
View the log:
|
||||||
|
```bash
|
||||||
|
cat /myems-cleaning.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Installation Option 3: Offline install on Ubuntu server without internet access
|
||||||
|
|
||||||
In this section, you will install myems-cleaning on Ubuntu Server.
|
In this section, you will install myems-cleaning on Ubuntu Server.
|
||||||
|
|
||||||
|
@ -117,7 +153,8 @@ python3 setup.py install
|
||||||
|
|
||||||
Install myems-cleaning service
|
Install myems-cleaning service
|
||||||
```bash
|
```bash
|
||||||
cp -R myems/myems-cleaning /myems-cleaning
|
cp -r myems/myems-cleaning /myems-cleaning
|
||||||
|
cd /myems-cleaning
|
||||||
```
|
```
|
||||||
Copy file example.env to .env and edit the .env file:
|
Copy file example.env to .env and edit the .env file:
|
||||||
```bash
|
```bash
|
||||||
|
@ -147,5 +184,5 @@ cat /myems-cleaning.log
|
||||||
|
|
||||||
### References
|
### References
|
||||||
|
|
||||||
1. https://myems.io
|
1. https://myems.io
|
||||||
2. https://dev.mysql.com/doc/connector-python/en/
|
2. https://dev.mysql.com/doc/connector-python/en/
|
|
@ -1,7 +1,7 @@
|
||||||
## MyEMS Modbus TCP Service
|
## MyEMS Modbus TCP Service
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
This service is a component of MyEMS to acquire data from Modbus TCP devices.
|
This service is a component of MyEMS Community Edition to acquire data from Modbus TCP devices.
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
|
@ -86,7 +86,43 @@ docker save --output myems-modbus-tcp.tar myems/myems-modbus-tcp
|
||||||
docker load --input .\myems-modbus-tcp.tar
|
docker load --input .\myems-modbus-tcp.tar
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option 2: Install myems-modbus-tcp on Ubuntu Server (bare-metal or virtual machine)
|
### Installation Option 2: Online install on Ubuntu server with internet access
|
||||||
|
|
||||||
|
In this section, you will install myems-modbus-tcp on Ubuntu Server with internet access.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp -r myems/myems-modbus-tcp /myems-modbus-tcp
|
||||||
|
cd /myems-modbus-tcp
|
||||||
|
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy exmaple.env file to .env and modify the .env file:
|
||||||
|
```bash
|
||||||
|
cp /myems-modbus-tcp/example.env /myems-modbus-tcp/.env
|
||||||
|
nano /myems-modbus-tcp/.env
|
||||||
|
```
|
||||||
|
Setup systemd service:
|
||||||
|
```bash
|
||||||
|
cp myems-modbus-tcp.service /lib/systemd/system/
|
||||||
|
```
|
||||||
|
Enable the service:
|
||||||
|
```bash
|
||||||
|
systemctl enable myems-modbus-tcp.service
|
||||||
|
```
|
||||||
|
Start the service:
|
||||||
|
```bash
|
||||||
|
systemctl start myems-modbus-tcp.service
|
||||||
|
```
|
||||||
|
Monitor the service:
|
||||||
|
```bash
|
||||||
|
systemctl status myems-modbus-tcp.service
|
||||||
|
```
|
||||||
|
View the log:
|
||||||
|
```bash
|
||||||
|
cat /myems-modbus-tcp.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Installation Option 3: Offline install on Ubuntu server without internet access
|
||||||
|
|
||||||
Download and install MySQL Connector:
|
Download and install MySQL Connector:
|
||||||
```bash
|
```bash
|
||||||
|
@ -126,8 +162,8 @@ python3 setup.py install
|
||||||
|
|
||||||
Install myems-modbus-tcp service
|
Install myems-modbus-tcp service
|
||||||
```bash
|
```bash
|
||||||
cd myems
|
cp -r myems/myems-modbus-tcp /myems-modbus-tcp
|
||||||
cp -R myems/myems-modbus-tcp /myems-modbus-tcp
|
cd /myems-modbus-tcp
|
||||||
```
|
```
|
||||||
Create .env file based on example.env and edit the .env file if needed:
|
Create .env file based on example.env and edit the .env file if needed:
|
||||||
```bash
|
```bash
|
||||||
|
|
|
@ -93,7 +93,43 @@ docker save --output myems-normalization.tar myems/myems-normalization
|
||||||
docker load --input .\myems-normalization.tar
|
docker load --input .\myems-normalization.tar
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option 2: Install myems-normalization on Ubuntu Server (bare-metal or virtual machine)
|
### Installation Option 2: Online install on Ubuntu server with internet access
|
||||||
|
|
||||||
|
In this section, you will install myems-normalization on Ubuntu Server with internet access.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp -r myems-normalization /myems-normalization
|
||||||
|
cd /myems-normalization
|
||||||
|
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy exmaple.env file to .env and modify the .env file:
|
||||||
|
```bash
|
||||||
|
cp /myems-normalization/example.env /myems-normalization/.env
|
||||||
|
nano /myems-normalization/.env
|
||||||
|
```
|
||||||
|
Setup systemd service:
|
||||||
|
```bash
|
||||||
|
cp myems-normalization.service /lib/systemd/system/
|
||||||
|
```
|
||||||
|
Enable the service:
|
||||||
|
```bash
|
||||||
|
systemctl enable myems-normalization.service
|
||||||
|
```
|
||||||
|
Start the service:
|
||||||
|
```bash
|
||||||
|
systemctl start myems-normalization.service
|
||||||
|
```
|
||||||
|
Monitor the service:
|
||||||
|
```bash
|
||||||
|
systemctl status myems-normalization.service
|
||||||
|
```
|
||||||
|
View the log:
|
||||||
|
```bash
|
||||||
|
cat /myems-normalization.log
|
||||||
|
```
|
||||||
|
|
||||||
|
### Installation Option 3: Offline install on Ubuntu server without internet access
|
||||||
|
|
||||||
In this section, you will install myems-normalization on Ubuntu Server.
|
In this section, you will install myems-normalization on Ubuntu Server.
|
||||||
|
|
||||||
|
@ -159,12 +195,9 @@ python3 setup.py install
|
||||||
```
|
```
|
||||||
|
|
||||||
Install myems-normalization service:
|
Install myems-normalization service:
|
||||||
```
|
```bash
|
||||||
cd ~
|
cp -r myems/myems-normalization /myems-normalization
|
||||||
git clone https://github.com/MyEMS/myems.git
|
cd /myems-normalization
|
||||||
cd myems
|
|
||||||
git checkout master (or the latest release tag)
|
|
||||||
cp -r ~/myems/myems-normalization /myems-normalization
|
|
||||||
```
|
```
|
||||||
Copy example.env file to .env file and modify the .env file:
|
Copy example.env file to .env file and modify the .env file:
|
||||||
```bash
|
```bash
|
||||||
|
@ -172,15 +205,15 @@ cp /myems-normalization/example.env /myems-normalization/.env
|
||||||
nano /myems-normalization/.env
|
nano /myems-normalization/.env
|
||||||
```
|
```
|
||||||
Setup systemd service:
|
Setup systemd service:
|
||||||
```
|
```bash
|
||||||
cp myems-normalization.service /lib/systemd/system/
|
cp myems-normalization.service /lib/systemd/system/
|
||||||
```
|
```
|
||||||
Enable the service:
|
Enable the service:
|
||||||
```
|
```bash
|
||||||
systemctl enable myems-normalization.service
|
systemctl enable myems-normalization.service
|
||||||
```
|
```
|
||||||
Start the service:
|
Start the service:
|
||||||
```
|
```bash
|
||||||
systemctl start myems-normalization.service
|
systemctl start myems-normalization.service
|
||||||
```
|
```
|
||||||
Monitor the service:
|
Monitor the service:
|
||||||
|
|
Loading…
Reference in New Issue