下载源码,地址略
解压 sudo tar zxvf post.. -C /usr/src/postgresql
解压文件中有个install,有安装步骤
./configure --prefix /usr/src/postgresql
出现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.
Use --without-readline to disable readline support.
据说这个问题可以忽视,
于是按照提示
configure --prefix /usr/src/postgresql --without -readline
然后make
三分钟后
All of PostgreSQL successfully made. Ready to install.
继续 sudo make install
PostgreSQL installation complete.
cd /usr/src/postgresql/bin
然后我 加了一个用户
sudo adduser postgres
mkdir /usr/src/postgresql/dat