From 1db984e8cb0b9498967464a42164d8ca6245ab91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=B7=E6=88=90=E4=BC=9F?= Date: Tue, 10 Dec 2024 10:23:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/deploy/das.md | 97 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 76 insertions(+), 21 deletions(-) diff --git a/docs/deploy/das.md b/docs/deploy/das.md index 73850206..b595286f 100644 --- a/docs/deploy/das.md +++ b/docs/deploy/das.md @@ -76,32 +76,41 @@ cd patch > PS. 此脚本会更改TDEngine的默认数据目录为/das/data/tddata -### TDEngine3启停 +### TDEngine3启动顺序 ```sh +#启动TD基础服务 systemctl start taosd - -systemctl stop taosd - -systemctl restart taosd +#启动TD适配器 +systemctl start taosadapter ``` -开机自启 +### TDEngine3停止顺序 ```shell -systemctl enable taosd +systemctl stop taosadapter +systemctl stop taosd ``` -### - 这样就完成了TDEngine3.3.2.13的安装。 +### 防火墙配置(可选) + +```shell +firewall-cmd --zone=public --add-port=6030/tcp --add-port=6041/tcp --permanent +firewall-cmd --reload +``` + + + + + ## PostgreSQL 安装配置 +### 安装PostgreSQL 15.10 + ```shell yum install postgresql-server -y -mkdir /das/data/pgdata -chown postgres:postgres /das/data/pgdata ```` ### 修改数据文件位置 @@ -112,11 +121,12 @@ chown postgres:postgres /das/data/pgdata Environment=PGDATA=/das/data/pgdata ``` -### 初始话数据库 +### 初始化数据库 ```shell +mkdir -p /das/data/pgdata +chown postgres:postgres /das/data/pgdata postgresql-setup initdb -systemctl start postgresql ``` ### 配置文件修改 @@ -127,33 +137,78 @@ systemctl start postgresql 修改数据监听端口,编辑文件`/das/data/pgdata/postgresql.conf`,修改为 ![alt text](image-1.png) -### 服务自启 +### 开启服务自启 + ```shell systemctl enable postgresql ``` -### 数据库初始化 +### 启动PostgreSQL + +```shell +systemctl start postgresql +``` + +### 数据库/账号创建 + +确保PostgreSQL已经正常启动,切换到postgres账户,并进入psql命令行界面 ```shell su - postgres +psql ``` -### Redis安装配置 +**创建账号** + +```plsql +create user das with password 'zaq12WSX'; +``` + +**创建数据库** + +```sql +create database das onwer das; +``` + +**分配权限** + +```sql +grant all privileges on database das to das; +``` + +### 数据初始化 + +以postgres用户执行 + +```shell +psql -h 127.0.0.1 -U das -d das -f /das/install/pginit.sql +``` + +### 防火墙配置(可选) + +```shell +firewall-cmd --zone=public --add-port=5432/tcp --permanent +firewall-cmd --reload +``` + + + +## Redis安装配置 ```shell yum install redis6 -y ``` ### 配置文件修改 -编辑文件`/etc/redis/redis.conf`,修改为 +编辑文件`/etc/redis/redis.conf` ![alt text](image-2.png) -第一处修改数据文件dump位置 +修改dir参数为`/das/data/redis` ![alt text](image-3.png) -第二处修改redis密码 +此处配置redis的访问密码 ![alt text](image-4.png) -第三处修改redis监听端口 +bind配置成`0.0.0.0`表示允许所以地址访问reids。protected-mode改为`no` ### 服务启动与自启 @@ -162,7 +217,7 @@ systemctl start redis systemctl enable redis ``` -### 防火墙配置 +### 防火墙配置(可选) ```shell firewall-cmd --zone=public --add-port=6379/tcp --permanent