1. 准备
- 安装Debian-11.4
公网环境且无特定需求的情况下可以使用在线模式:
- 更新软件包: apt-get update
- 安装依赖: apt-get install -y build-essential gdb bison flex zlib1g readline gcc readline libpq-dev
无公网环境
- 自定义安装需手动下载源码包,地址:PostgreSQL: File Browserhttps://www.postgresql.org/ftp/source/
- 依赖包仓库1:Index of /gnuhttps://ftp.gnu.org/gnu/
- 依赖包仓库2:Debian -- List of sections in "buster"https://packages.debian.org/buster/
uuid-ossp安装需要的必要依赖包
libossp-uuid-dev:https://packages.debian.org/sid/allpackages
2. 下载并安装PostgreSQL-14.11
- 访问下载页面:PostgreSQL: Linux downloads (Debian)https://www.postgresql.org/download/linux/debian/ 或者PostgreSQL: File Browserhttps://www.postgresql.org/ftp/source/
- 手动或者在线下载该版本:wget https://ftp.postgresql.org/pub/source/v14.11/postgresql-14.11.tar.gz
- 解压并进入目录:tar xzf postgresql-14.11.