首先說明,pg8.0在window下的數據庫目錄最好是ntfs格式,不過我只有fat32的,將就一下了,不過那樣就需要手動 initdb 了。安裝時先創建一個用戶,一般默認是 postgres,之后我是fat32的,去掉了那個鉤子,跳過數據初始化。
安裝完畢后,設置 pghome=f:postgresql8.0,然后進入dos,輸入 runas /user:postgres "cmd" 切換用戶,轉到postgresql的 bin 目錄,輸入
initdb --no-locale -d "f:\postgresql\8.0\data" -l "f:\postgresql\8.0\share"
如果成功,顯示
success. you can now start the database server using:
""postmaster -d "f:/postgresql/8.0/data"
or
""pg_ctl -d "f:/postgresql/8.0/data" -l logfile start
最后在開始菜單中 start service,postgresql就啟動了。運行pgadmin iii,好好體驗postgresql吧!
新聞熱點
疑難解答