当前位置: 首页 > web >正文

PostgreSQL-安装-win10、win11安装pgsql16.1和timescaledb2.13.0(绿色免安装版本)

1. 所属安装包

postgresql-16.1-1-windows-x64-lite.zip

        联系我获取下载地址

timescaledb-postgresql-16-windows-amd64-V2.13.0.zip (具体来源见下文)

https://github.com/timescale/timescaledb/releases/download/2.13.0/timescaledb-postgresql-16-windows-amd64.zip

第三方代理:https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.13.0/timescaledb-postgresql-16-windows-amd64.zip

部分系统环境可能还要求安装 OpenSSL 3.x.x

2. 安装postgresql-16.1-1-windows-x64-lite.zip

解压

0

文件说明:Make Cluster.bat 用于db文件夹初始化。可以不执行,默认data文件夹。

在当前文件夹的上一级设置权限,同时增加Evernone的权限(win11可能必须操作)

执行安装服务

修改Service - Maker.bat脚本,截图部分删除

0

用管理员打开cmd,执行Service - Maker.bat即可,会提示输入自定义的pgsql服务名称。

如果提示ip没有权限,是因为端口有占用,可以去data/postgresql.conf修改默认的5432端口

0

如果出现缺少dll

0

就安装 https://download.visualstudio.microsoft.com/download/pr/2c6b06c4-dc6a-4496-b769-b0d311cf515d/463F736D5925566EDC0E8F7D8E70C0A1FC95ADF44AFA5D5390B979F5A35934CC/VC_redist.x64.exe

或 https://code.jiangjiesheng.cn/attachment/cdn/tools/dev/databases/PgSQL16.1-green/VC_redist.x64.zip

3. 安装timescaledb-postgresql-16-windows-amd64-V2.13.0.zip

官方相关教程:

Timescale Documentation | Install TimescaleDB on Windows

但是不能直接使用使用其他的timescaledb的包(默认是最新版的,dll文件会不兼容,导致出现找不到dll文件的报错)

而是从 Releases · timescale/timescaledb · GitHub

每一页面搜索关键词“PostgreSQL 16”

找到 Full PostgreSQL 16 support for all existing features,即 2.13.0 (2023-11-28) 版本

https://github.com/timescale/timescaledb/releases/download/2.13.0/timescaledb-postgresql-16-windows-amd64.zip

第三方代理:https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.13.0/timescaledb-postgresql-16-windows-amd64.zip

更多版本的下载地址,可以自己尝试拼接:

https://github.com/timescale/timescaledb/releases/download/2.13.0/timescaledb-postgresql-16-windows-amd64.zip

https://github.com/timescale/timescaledb/releases/download/2.13.1/timescaledb-postgresql-16-windows-amd64.zip

https://github.com/timescale/timescaledb/releases/download/2.14.0/timescaledb-postgresql-16-windows-amd64.zip

https://github.com/timescale/timescaledb/releases/download/2.14.1/timescaledb-postgresql-16-windows-amd64.zip

https://github.com/timescale/timescaledb/releases/download/2.14.2/timescaledb-postgresql-16-windows-amd64.zip

https://github.com/timescale/timescaledb/releases/download/2.15.0/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.14.2/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.14.3/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.15.0/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.15.1/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.15.2/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.15.4/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.16.0/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.16.1/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.16.3/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.17.0/timescaledb-postgresql-16-windows-amd64.zip

https://ghfast.top/https://github.com/timescale/timescaledb/releases/download/2.17.1/timescaledb-postgresql-16-windows-amd64.zip

设置环境变量,必须

将上面postgresql-16.1-1-windows-x64-lite下的bin文件夹,添加到系统环境变量,不需要重启电脑。

先停用服务

进入系统 服务 ,停用pgsql服务

解压timescaledb-postgresql-16-windows-amd64.zip

右击setup.exe,管理员启动。

其中一步要输入postgresql.conf配置路径,示例:C:\Users\LP_T_24\Desktop\postgresql-16.1-1-windows-x64-lite\pgsql\data\postgresql.conf

最后回车关闭安装窗口

0

修改pgsql关键配置

data/postgresql.conf

shared_preload_libraries = 'timescaledb'

data/pg_hba.conf

将IPv4 的127.0.0.1/32 改成 0.0.0.0/0

进入系统 服务,重启pgsql服务

4. 开启时序数据库扩展并测试验证

SELECT * FROM pg_extension WHERE extname = 'timescaledb';CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;CREATE TABLE test_conditions (time        TIMESTAMPTZ       NOT NULL,location    TEXT              NOT NULL,temperature DOUBLE PRECISION  NULL,humidity    DOUBLE PRECISION  NULL
);INSERT INTO test_conditions (time, location, temperature, humidity) VALUES ('2025-03-18 17:39:11+08', '1', '2', '3');
INSERT INTO test_conditions (time, location, temperature, humidity) VALUES ('2025-03-19 17:39:11+08', '1', '2', '3');
INSERT INTO test_conditions (time, location, temperature, humidity) VALUES ('2025-03-20 17:39:11+08', '1', '2', '3');SELECT * from test_conditions;-- 删除超表,先备份数据 DROP TABLE test_conditions CASCADE;
select create_hypertable('test_conditions', 'time', chunk_time_interval=> interval '1 seconds', associated_table_prefix=>'_test_conditions', migrate_data => true);-- 执行删除,不同的版本,入参顺序不同
select drop_chunks(interval '5 seconds', 'test_conditions');
select drop_chunks('test_conditions',interval '5 seconds');

http://www.xdnf.cn/news/12024.html

相关文章:

  • 开源库 API 化平台 (ALLBEAPI) - 让优秀工具触手可及!
  • 实验设计如何拯救我的 CEI VSR 28G 设计
  • ubuntu下libguestfs-tools
  • 电力系统时间同步系统之二
  • 我的概要设计模板(以图书管理系统为例)
  • [Css]等腰梯形
  • 如何在IDE中通过Spark操作Hive
  • Ant Design动态增加表单项
  • 使用Prometheus+Grafana+Alertmanager+Webhook-dingtalk搭建监控平台
  • simulink这边重新第二次仿真时,直接UE5崩溃,然后simulink没有响应
  • AReaL-boba²:开源异步强化学习训练系统的革命性突破
  • 【C/C++】进一步介绍idl编码
  • RAG系统中的Re-ranking引擎选择指南
  • BERT vs Rasa 如何选择 Hugging Face 与 Rasa 的区别 模型和智能体的区别
  • 前端面试总结
  • 【从0-1的HTML】第3篇:html引入css的3种方式
  • CentOS 7 修改为静态 IP 地址完整指南
  • Visual Studio如何引入第三方头文件——以部署OpenGL为例
  • [蓝桥杯]对局匹配
  • xcode 各版本真机调试包下载
  • ESP32S3 LVGL超大字体
  • 「Java教案」顺序结构
  • innovus: defOutBySection应用
  • CentOS7关闭防火墙、Linux开启关闭防火墙
  • Linux网络协议栈:从Socket到网卡的星辰大海
  • TPU(张量处理单元)和 TVM(张量虚拟机)深度分析
  • 华为VanillaNet遇上BiFPN:YOLOv8的性能突破之旅
  • ASP.NET Core 中间件深度解析:构建灵活高效的请求处理管道
  • 隐藏层-机器学习
  • Kafka 消息队列