时间:2024-03-07 21:27作者:下载吧人气:30
注意下载的是二进制版,不是带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环境变量安装成功!不需要重新启动计算机啊!"
网友评论