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.
|
||||
|
||||
```bash
|
||||
cd ~
|
||||
git clone https://github.com/MyEMS/myems.git
|
||||
cd myems
|
||||
git checkout master (or the latest release tag)
|
||||
cd myems-aggregation
|
||||
cp -r myems/myems-aggregation /myems-aggregation
|
||||
cd /myems-aggregation
|
||||
pip install -r requirements.txt
|
||||
cp -r ~/myems/myems-aggregation /myems-aggregation
|
||||
```
|
||||
Copy exmaple.env file to .env and modify the .env file:
|
||||
```bash
|
||||
|
@ -151,9 +147,8 @@ python3 setup.py install
|
|||
|
||||
Install myems-aggregation service:
|
||||
```bash
|
||||
cd ~/myems
|
||||
git checkout master (or the latest release tag)
|
||||
cp -r ~/myems/myems-aggregation /myems-aggregation
|
||||
cp -r myems/myems-aggregation /myems-aggregation
|
||||
cd /myems-aggregation
|
||||
```
|
||||
Copy exmaple.env file to .env and modify the .env file:
|
||||
```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.
|
||||
* Copy source code to a production Ubuntu Server and then install tools
|
||||
```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
|
||||
```
|
||||
|
||||
* Install myems-api service:
|
||||
```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:
|
||||
```bash
|
||||
|
@ -215,7 +215,7 @@ python setup.py install
|
|||
|
||||
* Install myems-api service:
|
||||
```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:
|
||||
```bash
|
||||
|
|
|
@ -86,7 +86,43 @@ docker save --output myems-cleaning.tar myems/myems-cleaning
|
|||
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.
|
||||
|
||||
|
@ -117,7 +153,8 @@ python3 setup.py install
|
|||
|
||||
Install myems-cleaning service
|
||||
```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:
|
||||
```bash
|
||||
|
@ -147,5 +184,5 @@ cat /myems-cleaning.log
|
|||
|
||||
### References
|
||||
|
||||
1. https://myems.io
|
||||
2. https://dev.mysql.com/doc/connector-python/en/
|
||||
1. https://myems.io
|
||||
2. https://dev.mysql.com/doc/connector-python/en/
|
|
@ -1,7 +1,7 @@
|
|||
## MyEMS Modbus TCP Service
|
||||
|
||||
### 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
|
||||
|
||||
|
@ -86,7 +86,43 @@ docker save --output myems-modbus-tcp.tar myems/myems-modbus-tcp
|
|||
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:
|
||||
```bash
|
||||
|
@ -126,8 +162,8 @@ python3 setup.py install
|
|||
|
||||
Install myems-modbus-tcp service
|
||||
```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:
|
||||
```bash
|
||||
|
|
|
@ -93,7 +93,43 @@ docker save --output myems-normalization.tar myems/myems-normalization
|
|||
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.
|
||||
|
||||
|
@ -159,12 +195,9 @@ python3 setup.py install
|
|||
```
|
||||
|
||||
Install myems-normalization service:
|
||||
```
|
||||
cd ~
|
||||
git clone https://github.com/MyEMS/myems.git
|
||||
cd myems
|
||||
git checkout master (or the latest release tag)
|
||||
cp -r ~/myems/myems-normalization /myems-normalization
|
||||
```bash
|
||||
cp -r myems/myems-normalization /myems-normalization
|
||||
cd /myems-normalization
|
||||
```
|
||||
Copy example.env file to .env file and modify the .env file:
|
||||
```bash
|
||||
|
@ -172,15 +205,15 @@ 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:
|
||||
|
|
Loading…
Reference in New Issue