快速上手
如何快速下载、配置、安装 Pigsty ?
此处中文文档(v2.0)仍在修缮中,请以英文文档为准,最新文档请参阅: https://vonng.github.io/pigsty
最新版本: v2.0.0
Pigsty是本地优先的开源的 RDS PG 替代,也是开箱即用的开源数据库发行版,以 PostgreSQL 为核心,打包 TimescaleDB,PostGIS,Citus 与上百余+生态扩展插件, 整合了大规模生产环境所需的 PaaS基础设施 与数据分析组件:将顶级DBA的经验沉淀为软件,一次性解决使用数据库时会遇到的各类问题。
Pigsty还是自动驾驶的运维解决方案,带有全面专业的监控系统,与开箱即用的高可用 与时间点恢复能力。Pigsty 提供声明式的API 与 Database as Code 的能力:用户只需声明自己想要什么样的数据库,即可将其一键创建:PostgreSQL / Redis / MinIO / ETCD。
Pigsty是简单易用的开发者工具箱,无论是下载、安装、还是部署迁移备份恢复扩缩容,都能一键完成。基于Vagrant的本地沙箱与Terraform的多云部署能力,让Pigsty在所有环境中都能一键拉起,带来统一的使用体验。
Pigsty用途广泛,可支持各类上层SaaS应用或制作大屏/Demo。相比使用云数据库,数据安全自主可控,简运维、低成本、全功能、优体验,可以显著节省数据库运维人力,并节约 50% ~ 90% 的数据库综合成本。对各类企业用户、ISV、个人用户都具有显著的价值与吸引力。
更多介绍,请参考亮点特性。
准备一个使用 Linux x86_64 EL 7,8,9 兼容系统的全新节点,使用带有免密 sudo
权限的用户执行:
curl http://download.pigsty.cc/get | bash
安装完成后,您可以通过 80 端口访问 WEB 界面,通过 5432 端口访问默认的 PostgreSQL 数据库服务,详见安装。
$ curl http://download.pigsty.cc/get | bash
...
[Checking] ===========================================
[ OK ] SOURCE from CDN due to GFW
FROM CDN : bash -c "$(curl -fsSL http://download.pigsty.cc/get)"
FROM GITHUB : bash -c "$(curl -fsSL https://raw.githubusercontent.com/Vonng/pigsty/master/bin/get)"
[Downloading] ===========================================
[ OK ] download pigsty source code from CDN
[ OK ] $ curl -SL http://download.pigsty.cc/v2.0.0/pigsty-v2.0.0.tgz
...
MD5: 78a6ae5ff9ab0b8aa3848805aeadd1d8 /tmp/pigsty-v2.0.0.tgz
[Extracting] ===========================================
[ OK ] extract '/tmp/pigsty-v2.0.0.tgz' to '/root/pigsty'
[ OK ] $ tar -xf /tmp/pigsty-v2.0.0.tgz -C ~;
cd ~/pigsty # entering pigsty home directory before proceeding
[Proceeding] ===========================================
./bootstrap # install ansible & download the optional offline packages
./configure # preflight-check and generate config according to your env
./install.yml # install pigsty on this node and init it as the admin node
[Reference] ===========================================
Get Started: https://vonng.github.io/pigsty/#/INSTALL
Documentation: https://vonng.github.io/pigsty
Github Repo: https://github.com/Vonng/pigsty
Public Demo: http://demo.pigsty.cc
Official Site: https://pigsty.cc
./bootstrap # 确保 Ansible 正常安装,如果存在 /tmp/pkg.tgz 离线软件包,便使用它。
./configure # 执行环境检测,并生成相应的推荐配置文件,如果你知道如何配置 Pigsty 可以跳过
./install.yml # 根据生成的配置文件开始在当前节点上执行安装,使用离线安装包大概需要10分钟完成
您还可以使用 git
或 curl
直接从 Github Release 或 CDN 下载 Pigsty的源码与离线软件包
# get from GitHub
bash -c "$(curl -fsSL https://raw.githubusercontent.com/Vonng/pigsty/master/bin/get)"
# 使用 curl 从 Github 下载
curl -L https://github.com/Vonng/pigsty/releases/download/v2.0.0/pigsty-v2.0.0.tgz -o ~/pigsty.tgz # SRC
curl -L https://github.com/Vonng/pigsty/releases/download/v2.0.0/pigsty-pkg-v2.0.0.el9.x86_64.tgz -o /tmp/pkg.tgz # EL9
curl -L https://github.com/Vonng/pigsty/releases/download/v2.0.0/pigsty-pkg-v2.0.0.el8.x86_64.tgz -o /tmp/pkg.tgz # EL8
curl -L https://github.com/Vonng/pigsty/releases/download/v2.0.0/pigsty-pkg-v2.0.0.el7.x86_64.tgz -o /tmp/pkg.tgz # EL7
# 如果 curl 不可用,git clone 也可以
git clone https://github.com/Vonng/pigsty; cd pigsty; git checkout v2.0.0
Pigsty的名字是 “PostgreSQL In Great STYle” 的缩写,即 “全盛状态的 Postgres”。
pigsty 一词的的英文本意是猪圈,读作 Pig Style (/ˈpɪɡˌstaɪ/) 。
Pigsty基于AGPL 3.0协议 开源,可免费用于商业目的,亦提供专业的订阅服务支持。
如何快速下载、配置、安装 Pigsty ?
Pigsty 可以为您解决哪些问题 ?
使用Pigsty时需要了解的一些概念与定义
将Pigsty部署至您自己的服务器与虚拟机上
在元节点提供基础设施组件服务
将更多主机节点纳入Pigsty管理。
置备高可用PostgreSQL数据库集群!
置备Redis主从实例,哨兵集群与原生集群
Pigsty监控系统介绍
可以在Pigsty中探索的任务,以及常用的操作命令
基于Pigsty的软件部署与应用案例
更多详细参考信息,例如配置文件模板,指标列表等。
订阅服务,专业支持,群组交流,问题讨论,开源贡献,许可证,路线图
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.