Install and deploy on cloud host/physical machine

System Requirements

Minimum configuration

CPU1 Core
Memory1G
Disk128G
Operating SystemLinux 64-bit

Recommended configuration

Can be expanded on demand according to business needs

CPU2 cores
Memory2G
Disk128G
Operating SystemLinux 64-bit

installation steps

Step 1: Install Yao

Method 1: Run the installation script

curl -fsSL https://website.yaoapps.com/install.sh | bash

Method 2: Manually download the product

Download the product whose Linux architecture is amd64 and copy it to the bin directory. Download address

cp yao-0.10.1-linux-amd64 /usr/bin/yao
chmod +x /usr/bin/yao
yao version

Method 3: Source code compilation

Refer to the source code compilation document to compile the product. Copy the artifact to the /usr/bin/ directory and add executable permissions.

Step 2: Add User

Add user

useradd yao

Create application folder

mkdir /yaoapps

Step 3: Deploy the code

Copy the app code to the app directory, e.g.

git clone https://github.com/YaoApp/demo-crm.git /yaoapps/demo-crm
Note: In a production environment, set the launch mode to productionDisable the migrate command in production mode to prevent changes to the data table structure due to misoperation

Step 4: Configure the service

Use pm2 , supervisor and other service process management tools.

Supervisor configuration example:

[program:demo-crm-server]
directory=/yaoapps/demo-crm
command=/usr/local/bin/yao start
process_name=demo-crm-server
numprocs=1
autostart=true
autorestart=true
user=yao
group=yao
redirect_stderr=true
stdout_logfile=/yaoapps/demo-crm/supervisor.log
Note: Do not use root user to start services.

Start the service:

supervisor start

Check service status:

curl http://127.0.0.1:<Port>/api/xiang/ping

proxy server

If you need to use HTTPS or if you have multiple applications installed on one machine, you can use a proxy server such as Nginx, traefik.

traefik configuration example

[[tls.certificates]]
certFile = "/data/certs/star.yaoapps.com.crt"
keyFile = "/data/certs/star.yaoapps.com.key"
[http.routers.demo-crm]
tls=true
rule = "Host(`demo-crm.yaoapps.com`)"
service = "demo-crm@file"
[http.services]
[http.services.demo-crm.loadBalancer]
[[http.services.demo-crm.loadBalancer.servers]]
url = "http://127.0.0.1:<port>/"

Install and deploy on cloud host/physical machine

System Requirements

Minimum configuration

CPU1 Core
Memory1G
Disk128G
Operating SystemLinux 64-bit

Recommended configuration

Can be expanded on demand according to business needs

CPU2 cores
Memory2G
Disk128G
Operating SystemLinux 64-bit

installation steps

Step 1: Install Yao

Method 1: Run the installation script

curl -fsSL https://website.yaoapps.com/install.sh | bash

Method 2: Manually download the product

Download the product whose Linux architecture is amd64 and copy it to the bin directory. Download address

cp yao-0.10.1-linux-amd64 /usr/bin/yao
chmod +x /usr/bin/yao
yao version

Method 3: Source code compilation

Refer to the source code compilation document to compile the product. Copy the artifact to the /usr/bin/ directory and add executable permissions.

Step 2: Add User

Add user

useradd yao

Create application folder

mkdir /yaoapps

Step 3: Deploy the code

Copy the app code to the app directory, e.g.

git clone https://github.com/YaoApp/demo-crm.git /yaoapps/demo-crm
Note: In a production environment, set the launch mode to productionDisable the migrate command in production mode to prevent changes to the data table structure due to misoperation

Step 4: Configure the service

Use pm2 , supervisor and other service process management tools.

Supervisor configuration example:

[program:demo-crm-server]
directory=/yaoapps/demo-crm
command=/usr/local/bin/yao start
process_name=demo-crm-server
numprocs=1
autostart=true
autorestart=true
user=yao
group=yao
redirect_stderr=true
stdout_logfile=/yaoapps/demo-crm/supervisor.log
Note: Do not use root user to start services.

Start the service:

supervisor start

Check service status:

curl http://127.0.0.1:<Port>/api/xiang/ping

proxy server

If you need to use HTTPS or if you have multiple applications installed on one machine, you can use a proxy server such as Nginx, traefik.

traefik configuration example

[[tls.certificates]]
certFile = "/data/certs/star.yaoapps.com.crt"
keyFile = "/data/certs/star.yaoapps.com.key"
[http.routers.demo-crm]
tls=true
rule = "Host(`demo-crm.yaoapps.com`)"
service = "demo-crm@file"
[http.services]
[http.services.demo-crm.loadBalancer]
[[http.services.demo-crm.loadBalancer.servers]]
url = "http://127.0.0.1:<port>/"