Linux(centos6.4)下ArcSDE10.0安装文档

来源:互联网 发布:h5与后端数据库 编辑:程序博客网 时间:2024/06/06 21:17

1.首先检查oracle是否启动

  1. [oracle@localhost ~]$ sqlplus sys/sys@orcl as sysdba  
  2.   
  3. SQL*Plus: Release 11.2.0.1.0 Production on Mon May 12 15:48:56 2014  
  4.   
  5. Copyright (c) 1982, 2009, Oracle.  All rights reserved.  
  6.   
  7.   
  8. Connected to:  
  9. Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production  
  10. With the Partitioning, OLAP, Data Mining and Real Application Testing options
  11. SQL>

然后启动数据库服务

  1. SQL>startup
  2. SQL>quit

如果提示已经启动则进行第二步,如果不确定LISTENER是否启动执行

lsnrctl stop

lsnrctl start

2.创建arcsde用户(如果对方允许我们在oracle的用户操作,则可以不创建arcsde用户,直接使用oracle用户即可,因为我是测试机所以直接用oracle用户)

  1. [root@localhost ~]# useradd -d /home/arcsde -G oinstall -m arcsde  
  2. [root@localhost ~]# passwd arcsde  
  3. Changing password for user arcsde.  
  4. New UNIX password:  
  5. BAD PASSWORD: it is based on a dictionary word  
  6. Retype new UNIX password:  
  7. passwd: all authentication tokens updated successfully. 

3.上传安装文件

解压ArcSDEiso文件得到如下目录:

我们只是安装linux下的oracle11g_64,因此,只上传linux文件下的oracle11g_64到服务器。

例如我把此文件上传至/media/目录

[root@oracledb ~]# cp -a /mnt/hgfs/shares/oracle11g_64/ /media/ 

[root@oracledb ~]#

  1. [root@oracledb ~]# cp -a /mnt/hgfs/shares/oracle11g_64/ /media/  
  1. [root@oracledb ~]#
  2. [root@oracledb ~]#chmod –R 777 /media/ oracle11g_64

 

4.创建SDE的用户、表空间、赋予权限,查看一下相关的SQL文件

首先切换到oracle用户

  1. [root@oracledb ~]#su - oracle

其实创建这些东西不需要我们自己去做的,经查实在oracle11g_64目录下面有一个02.tar的包,解压包有一个createsdeoracle .sql文件:

  1. [root@oracledb ~]# su - oracle
  2. [oracle @oracledb ~]$ ll /media/oracle11g_64/
  3. total 153916
  4. -rwxrwxrwx 1 root root     18699 May 21  2010 01.toc
  1. -rwxrwxrwx 1 root root 157460480 May 21  2010 02.tar
  2. -rwxrwxrwx 1 root root      5366 May 21  2010 b5.nls
  3. -rwxrwxrwx 1 root root      8648 May 21  2010 en.nls
  4. -rwxrwxrwx 1 root root     52923 May 21  2010 install
  5. -rwxrwxrwx 1 root root      9015 May 21  2010 ja.nls
  6. -rwxrwxrwx 1 root root      9011 May 21  2010 jp.nls
  7. -rwxrwxrwx 1 root root     10786 May 21  2010 ko.nls
  8. -rwxrwxrwx 1 root root      7776 May 21  2010 th.nls
  9. -rwxrwxrwx 1 root root      5366 May 21  2010 tw.nls
  10. -rwxrwxrwx 1 root root      5335 May 21  2010 zh.nls
  1. [oracle @oracledb ~]$ tar –xvf /media/oracle11g_64/02.tar

默认解压在主目录的sdeexe100目录中

  1.  [oracle @oracledb ~]$ ll sdeexe100/tools/oracle/
  1. total 20
  2. -rw-r--r-- 1 oracle oinstall  979 Mar 30  2010 arcsde_database_startup.sql
  3. -rw-r--r-- 1 oracle oinstall 5118 Apr 27  2010 createsdeoracle.sql
  4. -rw-r--r-- 1 oracle oinstall 1389 Mar 30  2010 xml_lob_block_distribution.sql
  5. -rw-r--r-- 1 oracle oinstall 2351 Mar 30  2010 xml_lob_cache_size.sql
  6. [oracle@oracledb ~]$

打开这个文件进行编辑,主要修改一下几个地方我标记为红色的地方:<password>改为你的密码,LOCATION改为你的路径,前面创建的orcl表空间位置

 

  1. [oracle @oracledb ~]$ vim sdeexe100/tools/oracle/createsdeoracle.sql
  1. prompt * CREATESDEORACLE.SQL script                                 *
  2. prompt *                                                            *
  3. prompt * Purpose:                                                   *
  4. prompt *                                                            *
  5. prompt *       To create the SDE tablespace, the SDE Oracle user    *
  6. prompt *       and grant privileges to the SDE user                 *
  7. prompt *                                                            *
  8. prompt * NOTES: 1. Before running this script                       *
  9. prompt *           Replace the word LOCATION with the pathname for  *
  10. prompt *           the sde.dbf datafile to be created.              *
  11. prompt *                                                            *
  12. prompt *        2. If upgrading remove rem from the grants and      *
  13. prompt *       revokes in the upgrade section                   *
  14. prompt *                                                            *
  15. prompt *        3. Please use the sys user to run this script.      *
  16. prompt *           You will also need the system user password      *
  17. prompt *                                                            *
  18. prompt *    Example:                                                *
  19. prompt *       % sqlplus "sys as sydba" @createsdeoracle.sql        *
  20. prompt *                                                            *
  21. prompt *                                                            *
  22. prompt **************************************************************
  23.  
  24. rem /****************************************************************
  25. rem *
  26. rem *
  27. rem *
  28. rem *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  29. rem *
  30. rem *   COPYRIGHT 1992-2010 ESRI
  31. rem *
  32. rem *   TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
  33. rem *   Unpublished material - all rights reserved under the
  34. rem *   Copyright Laws of the United States.
  35. rem *
  36. rem *   For additional information, contact:
  37. rem *   Environmental Systems Research Institute, Inc.
  38. rem *   Attn: Contracts Dept
  39. rem *   380 New York Street
  40. rem *   Redlands, California, USA 92373
  41. rem *
  42. rem *   email: contracts@esri.com
  43. rem *
  44. rem *
  45. rem *:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  46. rem ***********************************************************************
  47.  
  48.  
  49. prompt * Granting of permissions by the SYS user in Oracle, on two packages
  50. prompt * to the public role.
  51.  
  52. grant execute on dbms_pipe to public;
  53. grant execute on dbms_lock to public;
  54.  
  55. prompt * * * * * * * * * * * * * * *
  56. prompt * ArcSDE NEW INSTALLATION   *
  57. prompt * * * * * * * * * * * * * * *
  58.  
  59. prompt * Connect as system/<password> to create the sde
  60. prompt * tablespace and user.
  61.  
  62. connect system/<password>
  63.  
  64. prompt * Create the sde tablespace.
  65. prompt * Before you run this script update LOCATION for the desired datafile pathname.
  66.  
  67. create tablespace sde
  68. datafile '/LOCATION/sde.dbf' size 400M
  69. extent management local uniform size 512K;
  70.  
  71. prompt * Create the sde user
  72. prompt * The password for the sde user is set to "sde". You may
  73. prompt * change this if you wish.
  74.  
  75. create user sde identified by sde
  76. default tablespace sde temporary tablespace temp;
  77.  
  78. prompt * Granting the required privileges to the sde user.
  79.  
  80. grant  CREATE SESSION to sde;
  81. grant  CREATE TABLE to sde;
  82. grant  CREATE PROCEDURE to sde;
  83. grant  CREATE SEQUENCE to sde;
  84. grant  CREATE TRIGGER to sde;
  85. grant  CREATE TYPE to sde;
  86. grant  CREATE LIBRARY to sde;
  87. grant  CREATE PUBLIC SYNONYM to sde;
  88. grant  CREATE OPERATOR to sde;
  89. grant  CREATE INDEXTYPE to sde;
  90. grant  DROP PUBLIC SYNONYM to sde;
  91. grant  CREATE VIEW to sde;
  92. prompt * UNLIMITED TABLESPACE is not required. Grant this privilege
  93. prompt * if you do not wish to explicitly manage and grant tablespace quota to SDE user.
  94. grant  UNLIMITED TABLESPACE to sde;
  95. prompt * ADMINISTER DATABASE TRIGGER can be revoked after install
  96. grant  ADMINISTER DATABASE TRIGGER to sde;
  97.  
  98.  
  99. prompt * * * * * * * * * * *
  100. prompt * ArcSDE UPGRADE    *
  101. prompt * * * * * * * * * * *
  102.  
  103. prompt * If upgrading please remove rem from each grant.
  104. prompt * Granting the required privileges to the sde user.
  105.  
  106. REM grant  ADMINISTER DATABASE TRIGGER to sde;
  107. REM grant  SELECT ANY TABLE to sde;
  108. REM grant  ALTER ANY INDEX to sde;
  109. REM grant  CREATE ANY TRIGGER to sde;
  110. REM grant  CREATE ANY INDEX to sde;
  111. REM grant  DROP ANY INDEX to sde;
  112. REM grant  CREATE ANY VIEW to sde;
  113. REM grant  DROP ANY VIEW to sde;
  114.  
  115. prompt * After upgrading you may revoke the following privileges
  116. prompt * Please remove rem from each revoke.
  117. prompt * Revoking the upgrade privileges to the sde user.
  118. REM revoke  ADMINISTER DATABASE TRIGGER from sde;
  119. REM revoke  SELECT ANY TABLE from sde;
  120. REM revoke  ALTER ANY INDEX from sde;
  121. REM revoke  CREATE ANY TRIGGER from sde;
  122. REM revoke  CREATE ANY INDEX from sde;
  123. REM revoke  DROP ANY INDEX from sde;
  124. REM revoke  CREATE ANY VIEW from sde;
  125. REM revoke  DROP ANY VIEW from sde;
  126.  
  127. prompt * Revoking privileges may cause ARCSDE objects to become invalid.
  128. prompt * Remove rem and run the following command to recompile ArcSDE objects.
  129. REM exec dbms_utility.compile_schema( 'SDE', compile_all => FALSE );
  130.  
  131. exit;

 

执行此sql文件,创建所有的信息:

  1. [oracle@localhost ~]$ sqlplus sys/oracle@orcl as sysdba  
  2.   
  3. SQL*Plus: Release 11.2.0.1.0 Production on Mon May 12 16:46:25 2014  
  4.   
  5. Copyright (c) 1982, 2009, Oracle.  All rights reserved.  
  6.   
  7.   
  8. Connected to:  
  9. Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production  
  10. With the Partitioning, OLAP, Data Mining and Real Application Testing options  
  11.   
  12. SQL> @ /sdeexe100/tools/oracle/ createsdeoracle.sql;  
  13. * CREATESDEORACLE.SQL script                                 *  
  14. *                                                            *  
  15. * Purpose:                                                   *  
  16. *                                                            *  
  17. *       To create the SDE tablespace, the SDE Oracle user    *  
  18. *       and grant privileges to the SDE user                 *  
  19. *                                                            *  
  20. * NOTES: 1. Before running this script                       *  
  21. *           Replace the word LOCATION with the pathname for  *  
  22. *           the sde.dbf datafile to be created.              *  
  23. *                                                            *  
  24. *        2. If upgrading remove rem from the grants and      *  
  25. *          revokes in the upgrade section                   *  
  26. *                                                            *  
  27. *        3. Please use the sys user to run this script.      *  
  28. *           You will also need the system user password      *  
  29. *                                                            *  
  30. *    Example:                                                *  
  31. *       % sqlplus "sys as sydba" @createsdeoracle.sql        *  
  32. *                                                            *  
  33. *                                                            *  
  34. **************************************************************  
  35. * Granting of permissions by the SYS user in Oracle, on two packages  
  36. * to the public role.  
  37.   
  38. Grant succeeded.  
  39.   
  40.   
  41. Grant succeeded.  
  42.   
  43. * * * * * * * * * * * * * * *  
  44. * ArcSDE NEW INSTALLATION   *  
  45. * * * * * * * * * * * * * * *  
  46. * Connect as system/<password> to create the sde  
  47. * tablespace and user.  
  48. Connected.  
  49. * Create the sde tablespace.  
  50. * Before you run this script update LOCATION for the desired datafile pathname.  
  51.   
  52. Tablespace created.  
  53.   
  54. * Create the sde user  
  55. * The password for the sde user is set to "sde". You may  
  56. * change this if you wish.  
  57.   
  58. User created.  
  59.   
  60. * Granting the required privileges to the sde user.  
  61.   
  62. Grant succeeded.  
  63.   
  64.   
  65. Grant succeeded.  
  66.   
  67.   
  68. Grant succeeded.  
  69.   
  70.   
  71. Grant succeeded.  
  72.   
  73.   
  74. Grant succeeded.  
  75.   
  76.   
  77. Grant succeeded.  
  78.   
  79.   
  80. Grant succeeded.  
  81.   
  82.   
  83. Grant succeeded.  
  84.   
  85.   
  86. Grant succeeded.  
  87.   
  88.   
  89. Grant succeeded.  
  90.   
  91.   
  92. Grant succeeded.  
  93.   
  94.   
  95. Grant succeeded.  
  96.   
  97. * UNLIMITED TABLESPACE is not required. Grant this privilege  
  98. * if you do not wish to explicitly manage and grant tablespace quota to SDE user                         .  
  99.   
  100. Grant succeeded.  
  101.   
  102. * ADMINISTER DATABASE TRIGGER can be revoked after install  
  103.   
  104. Grant succeeded.  
  105.   
  106. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr                         oduction  
  107. With the Partitioning, OLAP, Data Mining and Real Application Testing options  

测试sde是否连的通:

  1. [oracle@localhost ~]$ sqlplus sde/sde@orcl  
  2.   
  3. SQL*Plus: Release 11.2.0.1.0 Production on Mon May 12 16:49:32 2014  
  4.   
  5. Copyright (c) 1982, 2009, Oracle.  All rights reserved.  
  6.   
  7.   
  8. Connected to:  
  9. Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production  
  10. With the Partitioning, OLAP, Data Mining and Real Application Testing options  
  11.   
  12. SQL>  

5.安装arcsde

创建安装目录,并把安装文件复制过去(是用root用户安装)

[root@oracledb ~]#mkdir –p /opt/sde

[root@oracledb ~]#cp –a /media/oracle11g_64 /opt/sde

cd到目录进行安装

[root@oracledb ~]#cd /opt/sde/oracle11g_64

  1. [root@localhost~]# cd /opt/sde/oracle11g_64
  2. [root@localhost oracle11g_64]# ./install -load  
  3.  你可以读懂本行文字吗?  
  4.   
  5. Is the previous statement legible in your native language? [yes]   
  6.   
  7. Continue installation with the selected language interaction? [yes]   
  8. 如果你已阅读并同意所附许可协议中的条款,请输入'yes'继续安装过程否则按<回车>键或输入'no'退出安装过程. [no] yes  
  9.   
  10.   
  11.  敲回车选择默认项, '?'帮助, '^'返回到  
  12.  上一个问题'q'退出.  
  13.   
  14.  输入CD-ROM mount: [/mediamnt] /opt/sde/linux/oracle11g_64/  
  15.   
  16.  输入安装目录的路径名: [/opt/sde/linux/oracle11g_64] /home/arcsde/  
  17.   
  18. ArcSDE version 10.0 for Oracle11g - May 20, 2010    
  19. --------------------------------------------------  
  20.   
  21. ArcSDE Product  
  22.  将要安装的软件模块号: [all]   
  23.   
  24.   
  25.  软件模块选择完毕  
  26. --------------------------  
  27.   
  28.  你选择了安装下列软件模块  
  29.   
  30. ArcSDE Product  
  31.         ArcSDE Server                                           
  32.   
  33.  这正确吗? [yes]   
  34.   
  35.  安装时列出文件名吗? [no]   
  36.   
  37.  正在安装软件请等待...  
  38.   
  39.   
  40.   
  41.  软件安装完毕  
  42.   
  43.  退出...  
  44. [root@localhost oracle11g_64]#  

6.修改环境变量

  1. [oracle@localhost ~]$ vim .bash_profile  
  2. # .bash_profile  
  3.   
  4. # Get the aliases and functions  
  5. if [ -f ~/.bashrc ]; then  
  6.         . ~/.bashrc  
  7. fi  
  8.   
  9. # User specific environment and startup programs  
  10.   
  11. export PATH=$PATH:$HOME/bin  
  12. export ORACLE_BASE=/opt/oracle/app  
  13. export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
  14. export PATH=$PATH:$ORACLE_HOME/bin  
  15. export ORACLE_SID=orcl  
  16. export TNS_ADMIN=$ORACLE_HOME/network/admin  
  17. export SDEHOME=/opt/sde/oracle11g_64/sdeexe100  
  18. export LD_LIBRARY_PATH=$SDEHOME/lib:/usr/lib:/lib:$ORACLE_HOME/lib  
  19. export PATH=$PATH:$HOME:$ORACLE_HOME/bin:$SDEHOME/bin:/usr/lib64  

使之生效

[oracle@localhost ~]$ source .bash_profile

7.修改配置文件

 

修改配置文件参数,在ArcSDE用户下修改$SDEHOME/etc/services.sde文件添加实例名和端口号

  1. [arcsde@localhost etc]$ vi services.sde  
  2. [arcsde@localhost etc]$ more services.sde  
  3. /* $Id: services.sde,v 1.2 1999/01/22 01:01:35 donna Exp $ */  
  4. #  
  5. # ESRI SDE Remote Protocol  
  6. #   Note:  uncomment the line below to use ESRI's default port  
  7. #  
  8. esri_sde               5151/tcp  

Root用户下/etc/services文件一样添加

[root@localhost ~]# vi /etc/services 

执行sdesetup命令出错

  1. [oracle@localhost ~]$ sdesetup -o   
  2. -bash: sdesetup command not found 

查看一下sde软件的安装目录

  1. [oracle@localhost sdeexe100]$ ll  
  2. 总计 20  
  3. drwxr-xr-x 2 root  root 4096 02-22 13:34 bin  
  4. drwxr-xr-x 2 root  root 4096 02-22 13:48 etc  
  5. drwxr-xr-x 2 root  root 4096 02-22 13:34 lib  
  6. drwxr-xr-x 4 10018 kmem 4096 2010-01-09 locale  
  7. drwxr-xr-x 3 root  root 4096 02-22 13:34 tools  

这么目录应该为arcsde用户所属oinstall组,切换到root用户执行以下

  1. [root@localhost ~]# chown -R arcsde:oinstall /opt/sde/oracle11g_64  
  2. [root@localhost ~]# chmod -R 755 /opt/sde/oracle11g_64  
  3. [root@localhost ~]# su - arcsde  
  4. [oracle@localhost ~]$ cd $SDEHOME  
  5. [oracle@localhost sdeexe100]$ ll  
  6. 总计 20  
  7. drwxr-xr-x 2 arcsde oinstall 4096 02-22 13:34 bin  
  8. drwxr-xr-x 2 arcsde oinstall 4096 02-22 13:48 etc  
  9. drwxr-xr-x 2 arcsde oinstall 4096 02-22 13:34 lib  
  10. drwxr-xr-x 4 arcsde oinstall 4096 2010-01-09 locale  
  11. drwxr-xr-x 3 arcsde oinstall 4096 02-22 13:34 tools

8创建SDESchema

  1. [oracle@localhost ~]$ sdesetup -o install -d oracle11g -p sde  
  2.   
  3. ESRI ArcSDE Server Setup Utility Mon May 12 17:18:10 2014  
  4. ----------------------------------------------------------------  
  5. Install or update ArcSDE, GDB schema objects: Are you sure? (Y/N): y  
  6.   
  7. Checking INSTALL privileges for geodatabase ...  
  8. Current user has privilege to install geodatabase instance.  
  9.   
  10. Checking geodatabase XML datatype support...  
  11. Underlying RDBMS database instance supports XML data type.  
  12.   
  13. Creating ArcSDE schema.....  
  14. Successfully created ArcSDE schema.  
  15.   
  16. Installing St_Geometry ....  
  17. Successfully installed St_Geometry.  
  18.   
  19. Creating geodatabase schema.....  
  20. Successfully created GDB schema.  
  21.   
  22.   
  23. Successfully installed ArcSDE components.  
  24. Refer SDEHOME\etc\sde_setup.log for more details. 

9.更新相关的lic,注意lic文件的所属用户,所属组以及读写权限(注意这个sde 10.ecp为我自己编写的,发现之前的问题,里面只需要一条记录就ok)

  1. [oracle@localhost ~]$ sdesetup -o update_key -d oracle11g -l /media/sde\ 10.ecp -u sde -p sde -N 
  2.   
  3. ESRI ArcSDE Server Setup Utility Wed Feb 22 14:41:41 2012  
  4. ----------------------------------------------------------------  
  5. Successfully updated authorization key.  

10.启动ArcSDE服务

[oracle@oracledb ~]$ sdemon -o start  

Please enter ArcSDE DBA password:

 

 

-------------------------------------------------------

ArcSDE 10.0  for Oracle11g Build 685 Fri May 14 12:05:43  2010

-------------------------------------------------------

 

 

ST_Geometry Schema Owner: (SDE) Type Release: 1007

 

Instance initialized for ((sde)) . . .

 

 

Connected to instance . . .

 

DBMS Connection established...

 

RDBMS:                           "Oracle"

Instance Name:                   "esri_sde"

 

IOMGR Process ID (PID):           62675

 

 

ArcSDE Instance esri_sde started Mon May 12 17:24:07 2014

[oracle@oracledb ~]$

 

 

至此整个ArcSDE10.0的安装就完成了,可以去主机用ArcCatalog连接试试了。(连接成功)

0 0
原创粉丝点击