diff --git a/docs/deploy/image.png b/docs/deploy/asserts/image-pg01.png similarity index 100% rename from docs/deploy/image.png rename to docs/deploy/asserts/image-pg01.png diff --git a/docs/deploy/image-1.png b/docs/deploy/asserts/image-pg02.png similarity index 100% rename from docs/deploy/image-1.png rename to docs/deploy/asserts/image-pg02.png diff --git a/docs/deploy/image-2.png b/docs/deploy/asserts/image-redis01.png similarity index 100% rename from docs/deploy/image-2.png rename to docs/deploy/asserts/image-redis01.png diff --git a/docs/deploy/image-3.png b/docs/deploy/asserts/image-redis02.png similarity index 100% rename from docs/deploy/image-3.png rename to docs/deploy/asserts/image-redis02.png diff --git a/docs/deploy/asserts/image-redis03.png b/docs/deploy/asserts/image-redis03.png new file mode 100644 index 00000000..b9fa038a Binary files /dev/null and b/docs/deploy/asserts/image-redis03.png differ diff --git a/docs/deploy/das.md b/docs/deploy/das.md index b595286f..74f0068a 100644 --- a/docs/deploy/das.md +++ b/docs/deploy/das.md @@ -132,10 +132,10 @@ postgresql-setup initdb ### 配置文件修改 修改访问权限配置, 编辑文件`/das/data/pgdata/pg_hba.conf`,修改为 -![alt text](image.png) +![alt text](asserts/image-pg01.png) 修改数据监听端口,编辑文件`/das/data/pgdata/postgresql.conf`,修改为 -![alt text](image-1.png) +![alt text](asserts/image-pg02.png) ### 开启服务自启 @@ -167,7 +167,7 @@ create user das with password 'zaq12WSX'; **创建数据库** ```sql -create database das onwer das; +create database das owner das; ``` **分配权限** @@ -200,14 +200,22 @@ yum install redis6 -y ``` ### 配置文件修改 + +```shell +mkdir -p /das/data/redis +chown redis:redis /das/data/redis +``` + + + 编辑文件`/etc/redis/redis.conf` -![alt text](image-2.png) +![alt text](asserts/image-redis01.png) 修改dir参数为`/das/data/redis` -![alt text](image-3.png) +![alt text](asserts/image-redis02.png) 此处配置redis的访问密码 -![alt text](image-4.png) +![alt text](asserts/image-redis03.png) bind配置成`0.0.0.0`表示允许所以地址访问reids。protected-mode改为`no` ### 服务启动与自启 @@ -224,6 +232,200 @@ firewall-cmd --zone=public --add-port=6379/tcp --permanent firewall-cmd --reload ``` - ## minio安装配置 +### 程序部署 + +```shell +mkdir -p /das/data/minio +mkdir -p /das/app +cd /das/app +wget https://oss.jsspisoft.com/public/software/minio/minio.tar.gz +tar zxvf minio.tar.gz +rm -f minio.tar.gz +``` + +### 配置服务 + +创建`/etc/systemd/system/minio.service`, 内容如下: + +```toml +[Unit] +Description=Minio service +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +EnvironmentFile=-/das/app/minio/minio.env +ExecStart=/das/app/minio/minio server $MINIO_OPTS $MINIO_VOLUMES +TimeoutStopSec=infinity +LimitNOFILE=65535 +LimitNPROC=infinity +LimitCORE=infinity +StandardOutput=null +Restart=always +SendSIGKILL=no +TasksMax=infinity + +[Install] +WantedBy=multi-user.target +``` + +### 启动服务 + +```shell +systemctl daemon-reload +systemctl start minio +systemctl enable minio +``` + +### 防火墙配置(可选) + +```shell +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 +``` + diff --git a/docs/deploy/linux.md b/docs/deploy/linux.md index c729cdce..1135796d 100644 --- a/docs/deploy/linux.md +++ b/docs/deploy/linux.md @@ -51,7 +51,10 @@ OpenEuler的安装和Centos差不多,这里不详细说明了,就把几个 ### 更新系统(不能访问外网请忽略) 首先切换系统yum源为国内地址,加快更新速度。 ```bash -sed -e 's|http://repo.openeuler.org/|https://mirrors.ustc.edu.cn/openeuler/|g' \ -e 's|https://mirrors.openeuler.org/|https://mirrors.ustc.edu.cn/openeuler/|g' \ -i.bak \ /etc/yum.repos.d/openEuler.repo +sudo sed -e 's|http://repo.openeuler.org/|https://mirrors.ustc.edu.cn/openeuler/|g' \ + -e 's|https://mirrors.openeuler.org/|https://mirrors.ustc.edu.cn/openeuler/|g' \ + -i.bak \ + /etc/yum.repos.d/openEuler.repo ``` 创建索引缓存 ```bash