Linux: CentOS
1. log on to the system as the root user, download postgresql9.3, decompress the package, and enter the decompressed postgresql directory.
2. Compile and install
# Pwd
#./Configure -- profix =/usr/local/pgsql
(An error may occur. Install dependent packages such as gcc, readline, readline-devel, and zlib and install them using yum)
# Make
# Make install
3. Create users and groups
# Groupadd S
# Useradd-g postgres
4. Environment Settings
# Mkdir/usr/local/pgsql/data
# Chown postgres: postgres-R/usr/local/pgsql/data
# Su-postgres
$ Vim. bash_profile
Add:
PGHOME =/usr/local/pgsql
PGDATA = $ PGHOME/data
PATH = $ PATH: $ HOME/bin: $ PGHOME/bin
Export PGHOME
Export PGDATA
Export PATH
$ Source. bash_profile
5. initialize the database
$ Initdb-D $ PGDATA
6. system service configuration and Automatic startup
# Postgresql-9.3.1/cd/root
# Cp contrib/start-scripts/linux/etc/init. d/postgresql
# Chmod + x/etc/init. d/postgresql
# Service postgresql status -- (start | stop)
# Chkconfig -- add postgresql
# Chkconfig postgresql on
7. Configure the listening address and port
$ Vim $ PGDATA/postgresql. conf
$ Vim $ PGDATA/pg_hba.conf
PostgreSQL cache details
Compiling PostgreSQL on Windows
Configuration and installation of LAPP (Linux + Apache + PostgreSQL + PHP) Environment in Ubuntu
Install and configure phppgAdmin on Ubuntu
PostgreSQL details: click here
PostgreSQL: click here