1. download the latest postgresql version: www. postgresql. orgftpsource2, Extract files: tarzxvfpostgresql-8.3.7.tar.gzcdpostgresq
1. Download postgresql Latest Version: http://www.postgresql.org/ftp/source/ 2. Unzip the file: tar zxvf postgresql-8.3.7.tar.gzcd postgresq
Homepage → Database Technology
Background:
Read News
Install PostgreSQL in Linux 8.3
[Date: 2012-07-31] Source: Liux community Author: sunxingtao [Font:]
1. download the latest version of postgresql:
2. decompress the file:
Tar zxvf postgresql-8.3.7.tar.gz
Cd postgresql-8.3.7
3. Configuration:
./Configure -- prefix =/usr/local/pgsql
4. Compile:
Make
5. installation:
Make install
6. create user groups and users:
Groupadd postgres
Useradd-g postgres
7. Create a database file storage directory and grant permissions to ipvs:
Mkdir/usr/local/pgsql/data
Cd/usr/local/pgsql
Chown postgres. postgres data
8. initialize the database directory:
Switch user
Su-postgresql
Initialize data
/Usr/local/pgsql/bin/initdb-D/usr/local/pgsql/data
Start Database
/Usr/local/pgsql/bin/postmaster-D/usr/local/pgsql/data
9. Configure the listening address and port:
Vi/usr/local/pgsql/data/postgresql. conf
Uncomment the following two rows
Listen_addresses = '*'
Port = 5432
10. Allow remote connection:
Vi/usr/local/pgsql/data/pg_assist.conf
Add
Host all 192.168.1.0/24 trust
The specific meaning of each item is described in the configuration file.
Configure iptables for remote host access:
Vi/etc/sysconfig
Add
-A RH-Firewall-1-INPUT-m state -- state NEW-m tcp-p tcp -- dport 5432-j ACCEPT
Service iptables restart
11. Enable the postgresql database to start with the system startup:
Copy the startup script to the/etc/init. d/directory and execute the following command:
Cd/etc/rc. d/init. d
Cp (First Step unzipping the installation file directory)/postgresql-8.3.7/contrib/start-scripts/linux postgresql
Chmod + x postgresql
Vi postgresql
Prefix =/usr/local/pgsql
PGDATA = "/usr/local/pgsql/data"
PGUSER = postgres
PGLOG = "/var/log/pgsql. log"
Chkconfig -- add postgresql
Start the database:
Service postgresql start
The configuration is complete.
0
Install MySQL5.5.25a source code in RHEL Server 6.3
PostgreSQL 9.1.3 plpgsql debugger module
Related information: PostgreSQL Installation
Image Information
Under CentOS 6.3
PostgreSQL in Linux
View All comments in this article (0)
Comments
Latest Information
Popular this week
Introduction to Linux community-advertisement service-website map-help Info-contact us
The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.
Copyright©2006-2014 Linux community All rights reserved Zhejiang ICP backup No. 06018118
,