gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15945
  • QQ554730525
  • 铜币25337枚
  • 威望15352点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
阅读:4755回复:1

ArcSDE 10.1 for PostgreSQL on Windows安装

楼主#
更多 发布于:2012-10-16 09:05
<p><font size="4">  ArcGIS换了10.1后,需要安装SDE,按照以前的习惯依然选用PostgreSQL。但10.1的SDE安装步骤变化不小,记录下来供有需要的朋友参考。 <br/>  首先,安装介质上不再自带PostgreSQL数据库的安装文件了,需要自己下载。</font><a href="http://resources.arcgis.com/en/help/system-requirements/10.1/0151/015100000075000000.htm"><font size="4">系统要求</font></a><font size="4">上指明支持的版本是9.0.5 64bit(所有Enterprise SDE只支持64位的数据库),我在</font><a href="http://www.postgresql.org/download/windows/"><font size="4">官网上下载</font></a><font size="4">了最接近的9.0.8版本,安装。 <br/>其次,10.1版本在弱化ArcSDE服务连接的事实,所有文档默认使用直连的方式。最明显的体现是,将以前的Post Installation的步骤(创建数据库用户,系统表,Schema等工作)从ArcSDE的软件安装步骤中剥离了出来,而能够(也仅能够)采用名为</font><a href="http://resources.arcgis.com/en/help/main/10.1/0017/001700000162000000.htm"><font size="4">Create Enterprise Geodatabase</font></a><font size="4">的新GP工具来完成。因此,如果不需要ArcSDE服务连接方式的话,就无需安装ArcSDE软件了。 <br/>  下面说明建立直连方式的完整安装步骤(参考此</font><a href="http://resources.arcgis.com/en/help/main/10.1/002p/002p000000t4000000.htm"><font size="4">安装文档</font></a><font size="4">): <br/></font><ol><li><font size="4">安装PostgreSQL数据库;</font><li><font size="4">(可选)修改%PostgreSQL%\9.0\data\pg_hba.conf文件,添加“host     all          all      0.0.0.0/0       md5”记录,让任意客户端均可连接你的数据库集群(修改后需重启postgresql-x64-9.0服务以生效);</font><li><font size="4">从%Program Files%\ArcGIS\Desktop10.1\DatabaseSupport\PostgreSQL\Windows64目录下,拷贝st_geometry.dll文件到%PostgreSQL%\9.0\lib目录。在PostgreSQL中创建Geodatabase时必须用到此类库;</font><li><font size="4">配置PostgreSQL的客户端。因为直连方式要求ArcSDE的客户端必须安装数据库的客户端类库,所以首先需要获取PostgreSQL的客户端。ArcGIS Desktop是32位软件,需要的是32位的PostgreSQL类库。我在官网上的</font><a href="http://www.postgresql.org/download/windows/"><font size="4">zip archive</font></a><font size="4">链接中下载了32位的PostgreSQL binary文件,解压后将bin目录中的libeay32.dll, libiconv-2.dll, libintl-8.dll, libpq.dll, and ssleay32.dll文件拷贝到%Program Files%\ArcGIS\Desktop10.1\bin目录下;如果ArcGIS Server也需要直连到PostgreSQL中,则需要拷贝<strike>libeay32.dll, libintl.dll, libpq.dll, and ssleay32.dll</strike>上述同名的5个64位的库(帮助中的64位库列表有误)到%Program Files%\ArcGIS\Server\bin目录下,因为ArcGIS Server现在是64位的软件了,这几个库可在PostgreSQL 64位的安装目录下找到;</font><li><font size="4">在ArcMap中使用</font><a href="http://resources.arcgis.com/en/help/main/10.1/0017/001700000162000000.htm"><font size="4">Create Enterprise Geodatabase</font></a><font size="4">工具完成“Post Installation”过程。 <br/></font><a href="http://blog.newnaw.com/wp-content/uploads/2012/09/image.png"><font size="4"><img style="border-width: 0px; margin-right: auto; margin-left: auto; float: none; display: block;" title="image" border="0" alt="image" src="http://blog.newnaw.com/wp-content/uploads/2012/09/image_thumb.png" width="406" height="338"/></font></a><font size="4"> <br/>对于PostgreSQL库来说Instance是数据库所在的服务器名称;Database是所要新建的GDB名称;对于PostgreSQL,GDB Administrator只能是sde;如果Tablespace Name留空,会将GDB创建到默认的pg_default表空间里;</font><li><font size="4">建立直连连接。通过Add Database Connections建立直连连接: <br/><img style="border-width: 0px; margin-right: auto; margin-left: auto; float: none; display: block;" title="image" border="0" alt="image" src="http://blog.newnaw.com/wp-content/uploads/2012/09/image_thumb1.png" width="343" height="247"/>Database是刚才创建的GDB名称。 </font></li></ol><p><font size="4">  如果只需要使用直连方式连接的话,就到此结束了。如果仍需要使用ArcSDE服务方式连接,则需要其他步骤。下面说明建立ArcSDE服务连接的额外步骤: <br/></font><ol><li><font size="4">安装ArcSDE for PostgreSQL 10.1;</font><li><font size="4">修改%Program Files%\ArcGIS\ArcSDE\pgexe\etc\services.sde文件和Windows\System32\drivers\etc\hosts文件,分别增加“esri_sde 5151/tcp”记录;</font><li><font size="4">创建ArcSDE服务。你会发现1中安装完ArcSDE后没有弹出后配置的对话框,也无法从开始菜单中找到它,sdesetup命令也没有了install的操作,这也是前面为什么说这个工作仅能够通过新的GP工具来完成的原因。所以以前后配置向导中创建ArcSDE服务的工作就只能通过命令行方式来完成了,分别键入以下两个命令以完成在注册表中创建服务的工作: <br/>sdeservice -o create -d POSTGRESQL,postgresql-x64-9.0 <br/>sdeservice -o register -d POSTGRESQL,postgresql-x64-9.0 -r ADMIN_DATABASE -v sde</font><li><font size="4">启动服务。可以用“sdemon –o start”命令或从Windows服务面板中启动ArcSDE服务;</font><li><font size="4">创建连接。Add Database Connection只能创建直连连接,因此需要使用新的</font><a href="http://resources.arcgis.com/en/help/main/10.1/0017/0017000000pt000000.htm"><font size="4">Create ArcSDE Connection File</font></a><font size="4"> GP工具来创建ArcSDE服务连接文件。为了保持以前版本的使用习惯,可将新创建的.sde文件位置保存在c:\Users\Administrator\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\目录中,这样就可以从Database Connections节点中方便的找到它了。 <br/></font><a href="http://blog.newnaw.com/wp-content/uploads/2012/09/image1.png"><font size="4"><img style="border-width: 0px; margin-right: auto; margin-left: auto; float: none; display: block;" title="image" border="0" alt="image" src="http://blog.newnaw.com/wp-content/uploads/2012/09/image_thumb2.png" width="244" height="218"/></font></a><font size="4"> </font></li></ol><p><font size="4">  参考:</font><a href="http://blog.csdn.net/linghe301/article/details/6675044"><font size="4">http://blog.csdn.net/linghe301/article/details/6675044</font></a></p><p>本文作者:菩提老王</p>
喜欢0 评分0
游客

返回顶部