Contents

1 豕覯 れ企
2 豢蠍 (襭語襦 )
3 れ (れ 覦 蠏碁9 )
4 豢螳
5 蟆曙れ
6 ろ 覦
7 谿瑚襭
8 CentOS 6.0 れ
9 れ覓語


1 豕覯 れ企 #

http://www.postgres.org
su
cd /usr/local/src
wget http://ftp.postgresql.org/pub/source/v9.2.2/postgresql-9.2.2.tar.gz

2 豢蠍 (襭語襦 ) #

tar zxvf postgresql-9.2.2.tar.gz

3 れ (れ 覦 蠏碁9 ) #

cd /usr/local/src/postgresql-9.2.2
./configure
make
make install

4 豢螳 #

mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
adduser postgres
chown -R postgres:postgres /usr/local/pgsql 

5 蟆曙れ #

su postgres
cd $HOME
vi .bash_profile


PGDATA=/usr/local/pgsql/data
PGLIB=/usr/local/pgsql/lib
MANPATH=$MANPATH:/usr/local/pgsql/man
PATH=$PATH:/usr/local/pgsql/bin

export  PGDATA PGLIB MANPATH PATH 

6 ろ 覦 #

/etc/init.d/postgresql start
su - postgres
initdb -D /usr/local/pgsql/data
postgres -D /usr/local/pgsql/data >logfile 2>&1 
createdb test
psql test

mydb=# select current_date;

7 谿瑚襭 #

8 CentOS 6.0 れ #

yum install postgresql90-server postgresql90-contrib
service postgresql-9.0 initdb
service postgresql-9.0 start
ls /usr/pgsql-9.0/

9 れ覓語 #