1. 官网上下载linux的Pg12.2:http://www.postgres.cn/v2/download并解压
2. cd potgresql-12.2
3. ./configure --prefix=/opt/pgsql #拟安装至/opt/pgsql
执行前先安装gcc,readline,readline-devel,zlib,zlib-devel
用yum -y install -y readline,如果直接yum install下完了还会报错:
configure: error: readline library not found
If you have readline already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
修改权限chmod -R 777 ./configure再执行
成功:
4. make world
执行前先安装libxsl