時間:2024-03-07 21:27作者:下載吧人氣:24
注意下載的是二進制版,不是帶Windows Installer的。
http://www.enterprisedb.com/products-services-training/pgbindownload
x86下載http://get.enterprisedb.com/postgresql/postgresql-9.2.4-1-windows-binaries.zip
x64下載http://get.enterprisedb.com/postgresql/postgresql-9.2.4-1-windows-x64-binaries.zip
執行下列步驟前,暫作以下假定:
PostgreSQL擬裝在d:postgresql
數據庫以后擬存放在d:postgresqldata
首先下載postgresql-9.2.4-1-windows-x64-binaries.zip最新版待用,下列步驟達到手工安裝好PostgreSQL,初始化數據庫,將PostgreSQL注冊為服務。
1、PostgreSQL.zip解壓至d:postgresql后,創建一個data目錄;
2. 設置環境變量,編輯批處理文件 配置環境變量.vbs(永久生效)
a) 內容如下
on error resume next set sysenv=CreateObject("WScript.Shell").Environment("system") '系統環境變量的數組對象 Path = CreateObject("Scripting.FileSystemObject").GetFolder(".").Path '添加變量 sysenv("PGHOME")="D:pgsql" sysenv("PGHOST")="localhost" sysenv("Path")=sysenv("PGHOME")+"bin;"+sysenv("Path") sysenv("PGLIB")=sysenv("PGHOME")+"lib" sysenv("PGDATA")=sysenv("PGHOME")+"data" wscript.echo "PostgreSQL環境變量安裝成功!不需要重新啟動計算機啊!"
網友評論