1, decompression postgresql-9.6.4.tar.gz file tar xvf postgresql-9.6.4.tar.gz2, into the extracted file 3, installation database,./configure--prefix= Path NOTE: Error 1 encountered), ReadLine didn't find it.
Workaround: 1, check whether the system has been installed ReadLine
System already installed 2, search for the appropriate ReadLine package via Yum
3. Install Readline-devel Package
2), did not find zlib package solution: 1, check whether the system installed Zlib package, the system has installed Zlib package
2. Search for the appropriate Yum package through Yum
3. Install Zlib-devel package via Yum
4. Re-execute the installation statement, display the installation success 5, execute Make6, execute make INSTALL7, enter the database installation directory, install successfully
8. Create Postgres user and set Password: postgres
9. Create the data file and set permissions to create the data file in a recursive form
Set permissions
10. Enter the following documents to find the Initdb file
11, initialize the database, cannot use root user, need to use Postgres user
Initialize successfully 12, enter/u01/pgsql/data directory before modifying file configuration modification
After modification
Before modification
After modification
13. Modify the Environment configuration
14, set the environment variable effective immediately 15, execute PG_CTL Start database service 16, execute PG_CTL stop shutdown database service 17, execute psql Enter database command line space
The installation of PostgreSQL under Linux