PostgreSQL

PostgreSQL

コマンド


インストール


 [root@localhost postgres]# groupadd postgres
 [root@localhost postgres]# useradd postgres -g postgres -d /home/postgres
 [root@localhost postgres]# passwd postgres
  
 [root@localhost postgres]# mkdir /usr/local/pgsql
 [root@localhost postgres]# chown postgres.postgres /usr/local/pgsql
 
 # yumでインストール
 [root@localhost postgres]# yum install postgresql-server
 
 以下三つがインストールされていることを確認
 [root@localhost postgres]# rpm -qa | grep postgres
 postgresql-libs-8.4.1-1PGDG.fc11.x86_64
 postgresql-server-8.4.1-1PGDG.fc11.x86_64
 postgresql-8.4.1-1PGDG.fc11.x86_64

 # 起動
 [root@localhost postgres]# /etc/init.d/postgresql start

 # 接続
 [root@localhost postgres]# su - postgres
 [postgres@localhost ~]$ psql -l
         List of databases
    Name    |  Owner   | Encoding
 -----------+----------+----------
  postgres  | postgres | UTF8
  template0 | postgres | UTF8
  template1 | postgres | UTF8
 (3 rows)

[postgres@localhost ~]$ psql postgres

pgpool

参考URL

最終更新:2011年09月20日 00:55