更新文档
This commit is contained in:
parent
84cf14ab6f
commit
401285e779
@ -287,3 +287,145 @@ firewall-cmd --zone=public --add-port=9000-9001/tcp --permanent
|
||||
firewall-cmd --reload
|
||||
```
|
||||
|
||||
## Nginx部署
|
||||
|
||||
### 安装nginx
|
||||
|
||||
```shell
|
||||
yum install nginx -y
|
||||
```
|
||||
|
||||
配置文件
|
||||
|
||||
创建或编辑配置文件 `/etc/nginx/conf.d/nginx.conf`,内容如下:
|
||||
|
||||
```nginx
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
gzip on;
|
||||
gzip_types text/plain application/json application/javascript application/css application/xml text/javascript text/css;
|
||||
access_log /var/log/nginx/das.jsspisoft.access.log main;
|
||||
server_name 0.0.0.0;
|
||||
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
proxy_set_header HOST $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
client_max_body_size 0;
|
||||
proxy_read_timeout 1200s;
|
||||
}
|
||||
|
||||
|
||||
location / {
|
||||
index index.html;
|
||||
root /das/app/ui;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### 启动服务
|
||||
|
||||
```shell
|
||||
systemctl start nginx
|
||||
systemctl enable nginx
|
||||
```
|
||||
|
||||
|
||||
|
||||
## DAS程序部署
|
||||
|
||||
### 程序部署
|
||||
|
||||
```shell
|
||||
mkdir -p /das/app
|
||||
cd /das/app
|
||||
wget https://oss.jsspisoft.com/public/software/das/das.tar.gz
|
||||
tar zxvf das.tar.gz
|
||||
cd das
|
||||
ln -s das-1.0.0-release.jar das.jar -f
|
||||
```
|
||||
|
||||
### 修改配置文件
|
||||
|
||||
编辑`/das/app/das/application.yml`
|
||||
|
||||
```yaml
|
||||
# 日志配置
|
||||
logging:
|
||||
level:
|
||||
root: ERROR
|
||||
com:
|
||||
das:
|
||||
modules:
|
||||
calc: DEBUG
|
||||
file:
|
||||
name: /das/logs/das.log
|
||||
# 服务端口
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
#pg配置
|
||||
datasource:
|
||||
url: jdbc:postgresql://127.0.0.1:5432/das
|
||||
username: das
|
||||
password: zaq12WSX
|
||||
data:
|
||||
#redis连接配置
|
||||
redis:
|
||||
host: 127.0.0.1
|
||||
database: 0
|
||||
port: 6379
|
||||
password: zaq12WSX
|
||||
client-type: lettuce
|
||||
|
||||
# AES密钥
|
||||
das:
|
||||
aes:
|
||||
key: b6967ee87b86d85a
|
||||
#TD连接配置
|
||||
tdengine:
|
||||
password: taosdata
|
||||
url: jdbc:TAOS-RS://127.0.0.1:6041/das
|
||||
username: root
|
||||
|
||||
```
|
||||
|
||||
### 配置服务
|
||||
|
||||
创建服务文件`/etc/systemd/system/das.service`,内容如下:
|
||||
|
||||
```systemd
|
||||
[Unit]
|
||||
Description=DAS Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=JAVA_HOME=/etc/alternatives/java_sdk
|
||||
ExecStart=/usr/bin/java -Dfile.encoding=UTF-8 -jar das.jar
|
||||
|
||||
WorkingDirectory=/das/app/das
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
### 启动服务
|
||||
|
||||
```shell
|
||||
systemctl daemon-reload
|
||||
systemctl start das
|
||||
systemctl enable das
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user