yum install -y perl-ExtUtils-Embed readline-devel zlib-devel pam-devel libxml2-devel libxslt-
devel openldap-devel python-devel gcc-c++ openssl-devel cmake
useradd postgres
passwd postgres (设置postgre密码--postgres)
官网下载
tar -xzvf postgresql-13.4.tar.gz
./configure --prefix=/usr/local/pgsql
注:有些系统会报错 configure: error: cannot guess build type; you must specify one,这里需要
指定系统版本。
另外,还会报错 configure:error:readline library not found,简单的办法是编译的时候加--without-
readline。这个功能好像是psql上下翻的功能。
1 安装前的准备
1.1 安装依赖包
1.2 创建postgres用户
2 安装部署(用root用户安装)
2.1下载安装包
https://www.postgresql.org/ftp/source/v13.4/
2.2 解压到/home/postgres
2.3 配置
评论