加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Postgresql安装ArcSDE10.1

发布时间:2020-12-13 17:41:43 所属栏目:百科 来源:网络整理
导读:安装之前,请查看一下系统需求,看看相关环境是否满足 http://resources.arcgis.com/en/help/system-requirements/10.1/index.html#/PostgreSQL_Database_Requirements/015100000075000000/ 我安装的PostgreSQL版本是postgresql-9.0.8-1-windows-x64 如果你

安装之前,请查看一下系统需求,看看相关环境是否满足

http://resources.arcgis.com/en/help/system-requirements/10.1/index.html#/PostgreSQL_Database_Requirements/015100000075000000/

我安装的PostgreSQL版本是postgresql-9.0.8-1-windows-x64

如果你是Postgresql 9.1安装ArcSDE10.1,就必须打上SP1补丁

PostgreSQL 9.1 has been certified for use with ArcGIS 10.1 SP1. To create a geodatabase or the ST_Geometry type in a PostgreSQL 9.1 database,you must place the appropriate st_geometry library in the PostgreSQL lib directory. A folder named 9.1 has been added to the DatabaseSupport folder found in the ArcGIS client installation directory. The 9.1 folder contains the st_geometry library required to create a geodatabase or install the ST_Geometry type in a PostgreSQL 9.1 database,or upgrade an existing geodatabase to 10.1 SP1.

对Windows来说,安装就比较简单了,这里就不详细介绍了。

安装完毕之后,我们需要使用ArcGIS Desktop机器的来连接PostgreSQL机器

那么默认安装PostgreSQL后,只有本机的机器是可以连接数据库的,其他机器是不能连接的,如果需要连接是需要修改配置文件的,如果不修改,可以看到如下错误

Error Connecting to the server:致命错误:没有用于主机“192.168.100.111”,用户"postgres",数据库"postgres",SSL关闭的pg_hba.conf记录

从错误提示我们可以看出我们需要修改pg_hba.conf文件,该文件是在%PGHOME%/data里面的

该文件详细介绍参考:http://www.cnblogs.com/hiloves/archive/2011/08/20/2147043.html

# TYPE  DATABASE        USER            CIDR-ADDRESS            METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             all             192.168.100.1/24      md5   -------------------------新添加的
# IPv6 local connections:
host    all             all             ::1/128                 md5
因为我两个机器都是100网段,所以我将相关信息添加上去即可

修改完该配置文件之后,使用pg_ctl reload重新读取pg_hba.conf文件或者重启一下PostgreSQL服务即可。


这样我就可以使用ArcToolbox工具来创建ArcSDE库了,创建库之前,记得安装PG的32Bit的客户端,填写好相关的参数之后,我们发现安装后有如下问题

Executing: CreateEnterpriseGeodatabase PostgreSQL 192.168.100.203 sde DATABASE_AUTH postgres ***** SDE_SCHEMA sde ***** # "E:个人资料破解文件ArcGIS Server 10.1 none.ecp"
Start Time: Thu Aug 23 10:37:05 2012
User has privileges required to create database objects.
Geodatabase admin user created.
Database created.
Validated authorization file.
User has required privileges for geodatabase setup.
XML support is enabled for the database instance.
You must copy the latest ST_GEOMETRY and dependent libraries to the PostgreSQL software location. Refer to the ArcGIS help topics for more details.

Connected RDBMS instance is not setup for Esri spatial type configuration.
Failed to execute (CreateEnterpriseGeodatabase).
Failed at Thu Aug 23 10:37:09 2012 (Elapsed Time: 4.00 seconds)
系统会报如下错误
You must copy the latest ST_GEOMETRY and dependent libraries to the PostgreSQL software location. Refer to the ArcGIS help topics for more details.

Connected RDBMS instance is not setup for Esri spatial type configuration.

这说明,我们只是创建了相关的库对象,但是数据表和依赖包都没有创建,我们需要将ST_Geometry的dll拷贝到相应的数据库位置,那么这个ST_Geometry的dll在我们的ArcGIS Desktop或者ArcGIS Server的安装文件里面都有

比如ArcGIS Desktop在C:Program Files (x86)ArcGISDesktop10.1DatabaseSupportPostgreSQLWindows64路径下,将该dll拷贝到PostgreSQL的相关路径下

一定要记住路径是在%PGHOME%/lib里面即可,如果拷贝的位置不对,系统还会报上面的错误的

拷贝之后,再次运行创建SDE库

Executing: CreateEnterpriseGeodatabase PostgreSQL 192.168.100.203 sde DATABASE_AUTH postgres ***** SDE_SCHEMA sde ***** # "E:个人资料破解文件ArcGIS Server 10.1 none.ecp"
Start Time: Thu Aug 23 10:47:35 2012
User has privileges required to create database objects.
Geodatabase admin user already exists.
Database already exists.
Validated authorization file.
User has required privileges for geodatabase setup.
XML support is enabled for the database instance.
Connected RDBMS instance is setup for Esri spatial type configuration.
Created geodatabase tables and stored procedures.
Finished creating geodatabase schema.
Succeeded at Thu Aug 23 10:49:09 2012 (Elapsed Time: 1 minutes 34 seconds)
 
 
 


注意:如果是ArcSDE10.2的安装,需要注意一下相关的st_geometry.dll


我们看到这里有好几个文件夹,默认的linux 64和Windows64是适合于Postgresql9.0版本的,那么9.1和9.2文件夹也分别对应相关的Postgresql版本,因为ArcSDE10.1 SP1才支持postgresql9.1,ArcSDE10.2才支持postgresql9.2,所以需要对应上。


如果数据库服务器是Linix操作系统,其他都没有区别,只是相关的ST_Geometry的文件应该拷贝到

$PGHOME/lib/postgresql文件夹里面

在Linux操作系统拷贝有个小Bug,如果使用SSH连接ArcGIS桌面和Linux,是不能直接从C:Program Files (x86)ArcGISDesktop10.1DatabaseSupportPostgreSQLLinux64路径下直接将ST_geometry.so文件拷贝到Linux文件夹的,必须将该文件拷贝到Desktop机器的另外一个地方(比如桌面),再拷贝即可


-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
------------------------------------------------------------------------------------------------------

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读