Moya's Blog

About

慈濟大陸賑災、緬甸風災捐款: External link mark
郵政劃撥帳號-06692433
戶名-佛教慈濟基金會賑災專戶
(註明四川震災或緬甸風災)
慈濟捐款網站請按此 External link mark


處順境若能慈悲,則後福自在,仆逆境倘得智慧,則遺禍自消,於順境若能不喜,則後患不至,當逆境或能捨得,則福自踵來。此慈悲喜捨,便是大般涅槃無上妙法,入世行者或能三思。


《既然清淨,何必有網?》
《譬如大日,遍照不爽。》
《上下十方,無為自在;》
《因陀羅手,去曼達礙。》


靜思晨語系列 獅子吼大德 慈濟的好友 雅虎的好友 老骨頭級的朋友

07 May 2008 - 10:37 in by MoyaTseng
PostgreSQL 的安裝與初始化相當簡單,當然如果要 fine tune 的話,還有別的事情要處理。不過如果只是用來玩玩的話,這些安裝步驟就很夠用了。

對於 heavy loading 等等的系統,我是還有特別在去調過他的 share memory, socket 等等有的沒有的設定。不過,這些設定方式都和系統直接相關,不同系統的調整方法也不同,所以這邊就不介紹了。略過。

Install Steps

% cd /usr/ports/databases/postgresql83-server
% make all install clean

Configuration

  1. /etc/rc.conf
    # PostgreSQL Server
    postgresql_enable="YES"
    postgresql_data="/usr/local/pgsql/data"
    postgresql_flags="-o '-i -d 5 -E' -w -s -m fast"
    postgresql_initdb_flags="--encoding=SQL_ASCII --lc-collate=C"
    
  2. create database
    /usr/local/etc/rc.d/postgresql initdb
    

Startup Steps

  1. 啟動
          /usr/local/etc/rc.d/postgresql start
    
  2. 修改 pgsql 帳號密碼
    % psql -U pgsql template1
    psql> alter user pgsql with password '[想要使用的新密碼]'
    
  3. 修改 pg_hba.conf,限定所有的連線都要經過密碼確認
    # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
    
    # "local" is for Unix domain socket connections only
    local   all         all                               md5
    # IPv4 local connections:
    host    all         all         127.0.0.1/32          md5
    # IPv6 local connections:
    host    all         all         ::1/128               md5
    
  4. 重新載入設定,即可開啟連線密碼確認功能
    % sudo -u pgsql /usr/local/bin/pg_ctl reload -D "/usr/local/pgsql/data"
    


Leave a Reply

You may have to login or register to comment if you haven't already.

訪客統計: 3975 人次



請按此訂閱每日人間菩提。靜思晨語 External link mark
本站所有言論均不代表慈濟基金會 External link mark


我為你祝福
我也要許願

r1 – 07 May 2008 – 13:58:22 – Main.MoyaTseng
Copyright © 1999-2009 by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding Moya's Blog? Send feedback.