历史版本。 PostgreSQL 12 已结束支持。 2024-11-21. 请参阅 当前版本手册.
第 16 章 从源代码安装
目录
本章介绍如何使用源代码发布包安装 PostgreSQL。如果你安装的是预打包的发行版,例如 RPM 或 Debian 软件包,请忽略本章,改为阅读打包者提供的说明。
如果你要为 Microsoft Windows 构建 PostgreSQL,并打算使用 MinGW 或 Cygwin,请阅读本章;但如果打算使用 Microsoft 的 Visual C++,请改为参见第 17 章。
16.1. 简要说明 #
./configure make su make install adduser postgres mkdir /usr/local/pgsql/data chown postgres /usr/local/pgsql/data su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start /usr/local/pgsql/bin/createdb test /usr/local/pgsql/bin/psql test
详细说明见本章的其余部分。