updated REAEME files in Admin UI and Web UI
parent
ca0fe37a9d
commit
fcc2c3e30b
|
@ -8,7 +8,7 @@ Providing admin panel for MyEMS system administration and configuration
|
||||||
nginx-1.18.0 or later
|
nginx-1.18.0 or later
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Option 1: Install on NGINX Server
|
||||||
|
|
||||||
* Install NGINX Server
|
* Install NGINX Server
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ Add a new 'server' section with direstives as below:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* Download myems-admin
|
* Download myems
|
||||||
```
|
```
|
||||||
$ cd ~
|
$ cd ~
|
||||||
$ git clone https://github.com/MyEMS/myems.git
|
$ git clone https://github.com/MyEMS/myems.git
|
||||||
|
@ -77,17 +77,20 @@ The 'upload' folder is for user uploaded files. DO NOT delete/move/overwrite the
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Install Apache2 Server
|
## Option 2: Install on Apache2 Server
|
||||||
sudo apt-get install apache2
|
* Install Apache2 Server
|
||||||
|
|
||||||
|
refer to https://httpd.apache.org/docs/2.4/install.html
|
||||||
|
|
||||||
* Configure Apache2
|
* Configure Apache2
|
||||||
```
|
```
|
||||||
$ sudo vi /etc/apache2/ports.conf
|
$ sudo vi /etc/apache2/ports.conf
|
||||||
```
|
```
|
||||||
add a Listen
|
Add a Listen
|
||||||
```
|
```
|
||||||
Listen 8001
|
Listen 8001
|
||||||
```
|
```
|
||||||
|
```
|
||||||
$ sudo vi /etc/apache2/sites-available/000-default.conf
|
$ sudo vi /etc/apache2/sites-available/000-default.conf
|
||||||
```
|
```
|
||||||
Add a new 'VirtualHost' as below
|
Add a new 'VirtualHost' as below
|
||||||
|
@ -105,24 +108,20 @@ Add a new 'VirtualHost' as below
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|
||||||
* Download myems-admin
|
* Download myems-admin
|
||||||
```
|
```
|
||||||
$ cd ~
|
$ cd ~
|
||||||
$ git clone https://github.com/MyEMS/myems.git
|
$ git clone https://github.com/MyEMS/myems.git
|
||||||
```
|
```
|
||||||
Build and Compress
|
|
||||||
|
* Install myems-admin :
|
||||||
|
If the server can not connect to the internet, please compress the myems/admin folder and upload it to the server and extract it to ~/myems/admin
|
||||||
```
|
```
|
||||||
$ cd ~/myems/admin/
|
$ sudo cp -r ~/myems/admin /var/www/html/admin
|
||||||
$ sudo npm run build
|
$ sudo chmod 0755 -R /var/www/html/admin
|
||||||
$ tar czvf myems-admin.tar.gz build
|
|
||||||
```
|
```
|
||||||
Install Upload the file myems-admin.tar.gz to you admin server. Note that the following path should be same as that was configured in nginx.conf.
|
Check the config file and change it if necessary:
|
||||||
```
|
```
|
||||||
$ tar xzf myems-admin.tar.gz
|
$ sudo nano /var/www/html/admin/app/api.js
|
||||||
$ sudo rm -r /var/www/admin
|
|
||||||
$ sudo mv build /var/www/admin
|
|
||||||
```
|
|
||||||
Restart Apache2
|
|
||||||
```
|
|
||||||
$ sudo service apache2 restart
|
|
||||||
```
|
```
|
|
@ -30,7 +30,7 @@ This will create an optimized production build by compililing, merging and minif
|
||||||
|
|
||||||
You can run 'node server.js' to run the production build locally at http://localhost:5000.
|
You can run 'node server.js' to run the production build locally at http://localhost:5000.
|
||||||
|
|
||||||
## Install Production Build on NGINX Server
|
## Option 1: Install Production Build on NGINX Server
|
||||||
|
|
||||||
* Install NGINX Server
|
* Install NGINX Server
|
||||||
|
|
||||||
|
@ -105,22 +105,25 @@ $ sudo systemctl restart nginx
|
||||||
$ sudo mv build /var/www/html/web
|
$ sudo mv build /var/www/html/web
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install Apache2 Server
|
## Option 2: Install Production Build on Apache2 Server
|
||||||
sudo apt-get install apache2
|
* Install Apache2 Server
|
||||||
|
|
||||||
|
refer to https://httpd.apache.org/docs/2.4/install.html
|
||||||
|
|
||||||
* Configure Apache2
|
* Configure Apache2
|
||||||
```
|
```
|
||||||
$ sudo vi /etc/apache2/ports.conf
|
$ sudo vi /etc/apache2/ports.conf
|
||||||
```
|
```
|
||||||
add a Listen
|
Add a Listen
|
||||||
|
```
|
||||||
|
Listen 80
|
||||||
```
|
```
|
||||||
Listen 8002
|
|
||||||
```
|
```
|
||||||
$ sudo vi /etc/apache2/sites-available/000-default.conf
|
$ sudo vi /etc/apache2/sites-available/000-default.conf
|
||||||
```
|
```
|
||||||
Add a new 'VirtualHost' as below
|
Add a new 'VirtualHost' as below
|
||||||
```
|
```
|
||||||
<VirtualHost 127.0.0.1:8002>
|
<VirtualHost 127.0.0.1:80>
|
||||||
ServerAdmin MyEMS-web
|
ServerAdmin MyEMS-web
|
||||||
DocumentRoot /var/www/web
|
DocumentRoot /var/www/web
|
||||||
|
|
||||||
|
@ -132,11 +135,19 @@ Add a new 'VirtualHost' as below
|
||||||
ErrorLog ${APACHE_LOG_DIR}/error.log
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
```
|
||||||
|
|
||||||
* Download myems-web
|
* Download myems:
|
||||||
```
|
```
|
||||||
$ cd ~
|
$ cd ~
|
||||||
$ git clone https://github.com/MyEMS/myems.git
|
$ git clone https://github.com/MyEMS/myems.git
|
||||||
|
```
|
||||||
|
* Install myems-web :
|
||||||
|
|
||||||
|
Check and change the config file if necessary:
|
||||||
|
```
|
||||||
|
$ cd ~/myems/web
|
||||||
|
$ sudo nano src/config.js
|
||||||
```
|
```
|
||||||
Build and Compress
|
Build and Compress
|
||||||
```
|
```
|
||||||
|
@ -144,14 +155,11 @@ $ cd ~/myems/web/
|
||||||
$ sudo npm run build
|
$ sudo npm run build
|
||||||
$ tar czvf myems-web.tar.gz build
|
$ tar czvf myems-web.tar.gz build
|
||||||
```
|
```
|
||||||
Install Upload the file myems-web.tar.gz to you web server. Note that the following path should be same as that was configured in nginx.conf.
|
Install
|
||||||
|
Upload the file myems-web.tar.gz to you web server.
|
||||||
|
Note that the following path should be same as that was configured in 000-default.conf
|
||||||
```
|
```
|
||||||
$ tar xzf myems-web.tar.gz
|
$ tar xzf myems-web.tar.gz
|
||||||
$ sudo rm -r /var/www/web
|
$ sudo rm -r /var/www/web
|
||||||
$ sudo mv build /var/www/web
|
$ sudo mv build /var/www/web
|
||||||
|
|
||||||
```
|
|
||||||
Restart Apache2
|
|
||||||
```
|
|
||||||
$ sudo service apache2 restart
|
|
||||||
```
|
```
|
Loading…
Reference in New Issue