The project needs to use Gisgraphy, Zennai gisgraphy3.0 only supports postgis1.5. So you can only install the Posgresql and PostGIS of the old version number. From the support matrix diagram of PostGIS, you can see the PostgreSQL supported by the PostGIS different version numbers,
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbg9uz3nozw5nz3vvamk=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/center ">
I installed the postgresql9.1.14.
1. Download the source code for the postgresql9.1 version number, http://www.postgresql.org/docs/9.1/static/install-short.html
2. Unzip, then switch to the extracted directory
3. Execute the command:./configure
For example, the following error may occur here:
Configure:error:readline Library not found
My workaround is: Install
libreadline6-dev
sudo apt-get Installlibreadline6-dev
The problem has been solved
4. Execute the command:
Make
Make install
5. Verify that the installation is successful, enter the command:
Ls-l usr/local/pgsql/
Assume that both bin include Lib and share appear, indicating a successful installation.
6. Set up user accounts
AddUser Postgres
passwd Postgres
Input password
7. Create a PostgreSQL Data folder:
mkdir/usr/local/pgsql/data/
Chown Postgres:postgres/usr/local/pgsql/data
Ls-ld/usr/local/pgsql/data
will appear such as the following interface
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbg9uz3nozw5nz3vvamk=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast ">
8. Initialize the PostgreSQL Data folder
Su Postgres
/usr/local/pgsql/bin/initdb-d/usr/local/pgsql/data/
9. Verify the PostgreSQL Data folder
Ls-l/usr/local/pgsql/data
Appears for example the following interface:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbg9uz3nozw5nz3vvamk=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast ">
10. Start the Pgsql database
/usr/local/pgsql/bin/postmaster-d/usr/local/pgsql/data >logfile 2>&1 &
Cat logfile
Appears for example the following interface:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbg9uz3nozw5nz3vvamk=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast ">
11. Create a PostgreSQL database. and verify that the installation is successful
/usr/local/pgsql/bin/createdb Test
/usr/local/pgsql/bin/psql Test
If it appears, for example, the following interface, congratulations, successful installation
ubuntu14.04 Source code Installation PostgreSQL 9.1