postgresql-9.2beta2 安装相关

wget http://ftp.postgresql.org/pub/source/v9.2.0beta2/postgresql-9.2beta2.tar.gz

 

./configure && make && make install

初次接触 安装时没有太多的参数。

PostgreSQL installation complete.  安装完毕的提示

然后新建用户组

 

[root@mysql-test-woody pgsql]# groupadd postgresql

[root@mysql-test-woody pgsql]# useradd -g postgresql postgresql

[root@mysql-test-woody pgsql]# cd /home/postgresql/

[root@mysql-test-woody postgresql]# ls -lah

total 24K

drwx------  2 postgresql postgresql 4.0K Jun 19 09:48 .

drwxr-xr-x 11 root       root       4.0K Jun 19 09:48 ..

-rw-r--r--  1 postgresql postgresql   24 Jun 19 09:48 .bash_logout

-rw-r--r--  1 postgresql postgresql  176 Jun 19 09:48 .bash_profile

-rw-r--r--  1 postgresql postgresql  124 Jun 19 09:48 .bashrc

[root@mysql-test-woody postgresql]# vi .bash_profile

添加如下Path
export   PATH=$PATH:/usr/local/pgsql/bin
export   MANPATH=$MANPATH:/usr/local/pgsql/man
export   LD_LIBRARYPATH=$LD_LIBRARYPATH:/usr/local/pgsql/lib
 

Creating a Database Cluster

[postgresql@mysql-test-woody ~]$ initdb -D /usr/local/pgsql/data/

    postgres -D /usr/local/pgsql/data

or

    pg_ctl -D /usr/local/pgsql/data -l logfile start

 

Starting the Database Server

[postgresql@mysql-test-woody ~]$ pg_ctl start -l /usr/local/pgsql/log/pgsql.log

server starting

posted @ 2012-06-21 14:48  Woody Xu  阅读(139)  评论(0)    收藏  举报