免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5934 | 回复: 2
打印 上一主题 下一主题

postgre 安装[windows下如何打包] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-04-21 21:48 |只看该作者 |倒序浏览
   准备将postgre8打包进安装程序,可是安装了很多次postgre ,监视注册表,还是没有搞定,这是我了解的。
1、复制文件到安装目录
e:\postgresql\
2、复制共享库 libeay32.dll libiconv-2.dll libintl-2.dll libpq.dll ssleay32.dll 到c:\windows\system32
3、注册组件
..........
4、注册为服务
哪位知道postgre 的安装过程,主要就是注册为组件这个过程。请赐教,谢谢!
而且我手工添加服务成功但是不能启动。
E:\postgresql\bin>;pg_ctl register -N "OSTGRE" -D "E:\postgre/data"
这里是出错信息
事件 ID ( 0 )的描述(在资源( PostgreSQL )中)无法找到。本地计算机可能没有必要的注册信息或消息 DLL 文件来从远端计算机显示消息。您可能可以使用 /AUXSOURCE= 标识来检索词描述;查看帮助和支持以了解详细信息。下列信息是事件的一部分: Execution of PostgreSQL by a user with administrative permissions is not
permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromises. See the documentation for
more information on how to properly start the server.
------------------------------------------

  


看提示好象是因为 postgre 不能使用高权限用户启动的, 可是已经我在服务管理器里边将启动用户修改为一个普通用户了,但是依然是这个样子,不知道怎么解决,请指教,谢谢。。。。。

论坛徽章:
0
2 [报告]
发表于 2005-04-22 09:19 |只看该作者

postgre 安装[windows下如何打包]

是通过这个页面得到帮助的,虽然我只能看懂命令。http://techer.pascal.free.fr/postgis/postgresql800beta1/ch03.html

要点:
1、设置环境变量:
PGHOME =e:\postgresql
PGHOST=localhost
PGDATA= e:\postgresql\data
PGPORT=5432
PATH 加 e:\postgres\8.0\bin;postgres\8.0\lib;e:\postgres\8.0\share;
2、注册服务
  这里必须建立一个新的普通帐号 比如postgre
在CMD模式下运行
cd e:\postgresql\bin
pg_ctl register -N "postgre-8.0" -U postgres -P postgres -o -i
注意,这一点特别重要
必须带-U -P 参数指定用户名和密码
如果需要网络连接 必须带 -o -i 参数
3、启动服务
net start postgre-8.0

论坛徽章:
0
3 [报告]
发表于 2005-04-25 16:08 |只看该作者

postgre 安装[windows下如何打包]

F:\>;net start postgre-8.0
postgre-8.0 服务正在启动 .
postgre-8.0 服务无法启动。

服务没有报告任何错误。
请键入 NET HELPMSG 3534 以获得更多的帮助。
在这种情况下,切换到postgres 用户 测试
F:\>;runas /user:postgres "pg_ctl start"
输入 postgres 的密码:
试图将 pg_ctl start 作为用户 "ABINCMP\postgres" 启动...
如果不能启动,一般是data权限的问题,重新初始化久可以了。
首先删除data目录。 然后运行
F:\>;runas /user:postgres "initdb"
输入 postgres 的密码:
试图将 initdb 作为用户 "ABINCMP\postgres" 启动...
现在就可以启动了。整个过程大概是这样子的。

写环境变量
PGDATA=e:/postgresql/data
PGHOME=e:/postgresql
PGHOST=localhost
PGPORT=5432
PATH= e:/postgresql/bin
添加用户
net user postgres testpwd /add
net localgroup Users postgres /delete
注册服务
pg_ctl register -N "postgre-server" -U postgres -P testpwd -o -i
初始化数据库
runas /user:postgres "initdb"
启动数据库
net start postgre-server
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP