Files
TJWaterServer/setup_server.md
2025-02-09 10:43:02 +08:00

43 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
搭建服务器
1. `git clone https://e.coding.net/tjwater/tjwatercloud/TJWaterServer.git`
2. 控制台进入 `TJWaterServer`
3. 运行 `python install.py` 准备Python环境
4. 解压 `pg14.zip` 到上一层文件夹
5. 控制台进入 `../pg14/bin`
6. 执行 `initdb -D ../data -E UTF-8` 创建数据库
7. 执行 `pg_ctl -D ../data -l logfile start` 启动数据库服务
- `pg_ctl -D ../data -l logfile stop` 关闭数据库服务
8. 进入 `TJWaterServer`,执行 `python create_template.py` 创建模板
9. 搭建FastAPI环境...
10. 进入 `TJWaterServer`,执行 `startserber.bat`
pg 信息
腾讯Windows服务器
Host: localhost (默认)
Port: 5432 (默认)
User: 就是Windows的用户名这台机器也就是 Administrator
Password: 密码为空
influx db 信息
# influxdb数据库连接信息
influx_url = "http://localhost:8086" # 替换为你的InfluxDB实例地址
influx_token = "xGDM5RZqRJAuzAGS-otXUdC2NFdY75qJAjRLqAB4p5WcIIAlIUpOpT8_yA16AOHmJWerwQ_08gwb84sy42jnZQ==" # 替换为你的InfluxDB Token
influx_org_name = "TJWATERORG" # 替换为你的Organization名称
influx_client = InfluxDBClient(url=influx_url, token=influx_token, org=influx_org_name)
UserName tjwater
Password Tjwater@123456
Organizatio TJWATEORG
Bucket TJWATERBUCKET
API Token : xGDM5RZqRJAuzAGS-otXUdC2NFdY75qJAjRLqAB4p5WcIIAlIUpOpT8_yA16AOHmJWerwQ_08gwb84sy42jnZQ==
influx config create --config-name onboarding `
--host-url "http://localhost:8086" `
--org "TJWATERORG" `
--token "xGDM5RZqRJAuzAGS-otXUdC2NFdY75qJAjRLqAB4p5WcIIAlIUpOpT8_yA16AOHmJWerwQ_08gwb84sy42jnZQ==" `
--active