目录
官网下载源码压缩包
添加用户postgres
groupadd postgres
useradd -d /home/postgres -m postgres -g postgres
passwd postgres
解压压缩包
tar -zxvf postgresql-xx.tar.gz -C /home/postgres/
configure
[postgres@192 postgresql-14.3]$ ./configure --prefix=/usr/pgsql-14 --enable-debug --enable-cassert --with-libxml
- 如果报错no acceptable C compiler found in $PATH,则sudo yum install gcc-c++,
- 如果报错readline library not found,则yum -y install -y readline-devel,
- 如果报错zlib library not found,则yum install zlib-devel,
- 如果报错library 'xml2' (version >= 2.6.23) is required for XML support,则yum install libxml2 libxml2-devel
详情请见: 链接