Linux操作系统安装ArcSDE10

来源:互联网 发布:javascript sort 编辑:程序博客网 时间:2024/06/07 03:00


1:首先检查一下在Linux操作系统下Oracle数据库是否能启动,是否能连通等

[oracle@localhost ~]$ sqlplus sys/oracle@orcl as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 10:33:47 2012Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>[oracle@localhost ~]$ sqlplus sys/oracle as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 10:59:05 2012Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>
创建操作系统级别的ArcSDE用户
[root@localhost ~]# user add -d /home/arcsde -G oinstall -m arcsde-bash: user: command not found[root@localhost ~]# useradd -d /home/arcsde -G oinstall -m arcsde[root@localhost ~]# passwd arcsdeChanging password for user arcsde.New UNIX password:BAD PASSWORD: it is based on a dictionary wordRetype new UNIX password:passwd: all authentication tokens updated successfully.[root@localhost ~]# su - arcsde[arcsde@localhost ~]$
创建SDE的用户、表空间、赋予权限,查看一下相关的SQL文件

prompt * Granting of permissions by the SYS user in Oracle, on two packagesprompt * to the public role.grant execute on dbms_pipe to public;grant execute on dbms_lock to public;prompt * * * * * * * * * * * * * * *prompt * ArcSDE NEW INSTALLATION   *prompt * * * * * * * * * * * * * * *prompt * Connect as system/<password> to create the sdeprompt * tablespace and user.connect sys/oracle@orcl as sysdbaprompt * Create the sde tablespace.prompt * Before you run this script update LOCATION for the desired datafile pathname.//创建SDE表空间,路径需要注意create tablespace sdedatafile '/opt/oracle/oradata/ORCL/sde.dbf' size 400Mextent management local uniform size 512K;prompt * Create the sde userprompt * The password for the sde user is set to "sde". You mayprompt * change this if you wish.create user sde identified by sdedefault tablespace sde temporary tablespace temp;prompt * Granting the required privileges to the sde user.grant  CREATE SESSION to sde;grant  CREATE TABLE to sde;grant  CREATE PROCEDURE to sde;grant  CREATE SEQUENCE to sde;grant  CREATE TRIGGER to sde;grant  CREATE TYPE to sde;grant  CREATE LIBRARY to sde;grant  CREATE PUBLIC SYNONYM to sde;grant  CREATE OPERATOR to sde;grant  CREATE INDEXTYPE to sde;grant  DROP PUBLIC SYNONYM to sde;grant  CREATE VIEW to sde;prompt * UNLIMITED TABLESPACE is not required. Grant this privilege prompt * if you do not wish to explicitly manage and grant tablespace quota to SDE user.grant  UNLIMITED TABLESPACE to sde;prompt * ADMINISTER DATABASE TRIGGER can be revoked after installgrant  ADMINISTER DATABASE TRIGGER to sde;exit;
执行该SQL语句,得到如下信息

[oracle@localhost ~]$ sqlplus sys/oracle@orcl as sysdbaSQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 11:44:53 2012Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> @ create.sql;* CREATESDEORACLE.SQL script                                 **                                                            ** Purpose:                                                   **                                                            **       To create the SDE tablespace, the SDE Oracle user    **       and grant privileges to the SDE user                 **                                                            ** NOTES: 1. Before running this script                       **           Replace the word LOCATION with the pathname for  **           the sde.dbf datafile to be created.              **                                                            **        2. If upgrading remove rem from the grants and      **          revokes in the upgrade section                   **                                                            **        3. Please use the sys user to run this script.      **           You will also need the system user password      **                                                            **    Example:                                                **       % sqlplus "sys as sydba" @createsdeoracle.sql        **                                                            **                                                            **************************************************************** Granting of permissions by the SYS user in Oracle, on two packages* to the public role.Grant succeeded.Grant succeeded.* * * * * * * * * * * * * * ** ArcSDE NEW INSTALLATION   ** * * * * * * * * * * * * * ** Connect as system/<password> to create the sde* tablespace and user.Connected.* Create the sde tablespace.* Before you run this script update LOCATION for the desired datafile pathname.Tablespace created.* Create the sde user* The password for the sde user is set to "sde". You may* change this if you wish.User created.* Granting the required privileges to the sde user.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.Grant succeeded.* UNLIMITED TABLESPACE is not required. Grant this privilege* if you do not wish to explicitly manage and grant tablespace quota to SDE user                         .Grant succeeded.* ADMINISTER DATABASE TRIGGER can be revoked after installGrant succeeded.Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr                         oductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options
测试sde用户是否可以连通

[oracle@localhost ~]$ sqlplus sde/sde@orclSQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 11:46:18 2012Copyright (c) 1982, 2009, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL>
安装相关的ArcSDE软件

首先将ArcSDE光盘插入光驱,使用mount命令,如果条件允许也可以SSH工具直接传入

[root@localhost ~]# mount /dev/cdrom  /opt/sdelogin as: rootroot@192.168.221.133's password:Last login: Wed Feb 22 10:26:33 2012 from 192.168.221.1[root@localhost ~]# mount /dev/cdrom /opt/sdemount: block device /dev/cdrom is write-protected, mounting read-onlymount: /dev/cdrom already mounted or /opt/sde busymount: according to mtab, /dev/hdc is already mounted on /opt/sde[root@localhost ~]# cd /opt/sde[root@localhost sde]# lsdocumentation_server  htm  install_db2.htm       install_oracle.htm      linux           solarishpia                  ibm  install_informix.htm  install_postgresql.htm  quickstart.htm
然后我们执行安装命令,安装过程中会提示用户软件安装介质在什么位置,这些软件需要安装到什么位置
[root@localhost oracle11g_64]# ./install -load 你可以读懂本行文字吗?Is the previous statement legible in your native language? [yes] Continue installation with the selected language interaction? [yes] 如果你已阅读并同意所附许可协议中的条款,请输入'yes'继续安装过程, 否则按<回车>键或输入'no'退出安装过程. [no] yes 敲回车选择默认项, '?'帮助, '^'返回到 上一个问题, 或'q'退出. 输入CD-ROM mount点: [/mediamnt] /opt/sde/linux/oracle11g_64/ 输入安装目录的路径名: [/opt/sde/linux/oracle11g_64] /home/arcsde/ArcSDE version 10.0 for Oracle11g - May 20, 2010  --------------------------------------------------ArcSDE Product 将要安装的软件模块号: [all]  软件模块选择完毕-------------------------- 你选择了安装下列软件模块ArcSDE Product        ArcSDE Server                                          这正确吗? [yes]  安装时列出文件名吗? [no]  正在安装软件, 请等待... 软件安装完毕 退出...[root@localhost oracle11g_64]# 
根据用户软件安装的位置以及Oracle软件安装的信息,添加arcsde用户的环境变量

[arcsde@localhost ~]$ vi .bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then        . ~/.bashrcfi# User specific environment and startup programs#export PATH=$PATH:$HOME/binexport ORACLE_BASE=/opt/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=ORCLexport TNS_ADMIN=$ORACLE_HOME/network/adminexport SDEHOME=/home/arcsde/sdeexe100export LD_LIBRARY_PATH=$SDEHOME/lib:/usr/lib:/lib:$ORACLE_HOME/libexport PATH=$PATH:$HOME:$ORACLE_HOME/bin:$SDEHOME/bin
修改完毕环境变量,使之生效,然后测试一下是否生效
[arcsde@localhost ~]$ vi .bash_profile[arcsde@localhost ~]$ . ./.bash_profile[arcsde@localhost ~]$ echo $SDEHOME/home/arcsde/sdeexe100[arcsde@localhost ~]$ cd $SDEHOME[arcsde@localhost sdeexe100]$ pwd/home/arcsde/sdeexe100[arcsde@localhost sdeexe100]$
修改配置文件参数,在ArcSDE用户下修改$SDEHOME/etc/services.sde文件添加实例名和端口号

[arcsde@localhost etc]$ vi services.sde[arcsde@localhost etc]$ more services.sde/* $Id: services.sde,v 1.2 1999/01/22 01:01:35 donna Exp $ */## ESRI SDE Remote Protocol#   Note:  uncomment the line below to use ESRI's default port#esri_sde               5151/tcp
在Root用户下/etc/services文件一样添加

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

执行sdesetup命令出错

[arcsde@localhost bin]$ sdesetup -o -bash: sdesetup command not found
查看一下sde软件的安装目录

[arcsde@localhost sdeexe100]$ ll总计 20drwxr-xr-x 2 root  root 4096 02-22 13:34 bindrwxr-xr-x 2 root  root 4096 02-22 13:48 etcdrwxr-xr-x 2 root  root 4096 02-22 13:34 libdrwxr-xr-x 4 10018 kmem 4096 2010-01-09 localedrwxr-xr-x 3 root  root 4096 02-22 13:34 tools
这么目录应该为arcsde用户所属oinstall组,切换到root用户执行以下
[root@localhost ~]# chown -R arcsde:oinstall /home/arcsde[root@localhost ~]# chmod -R 755 /home/arcsde[root@localhost ~]# su - arcsde[arcsde@localhost ~]$ cd $SDEHOME[arcsde@localhost sdeexe100]$ ll总计 20drwxr-xr-x 2 arcsde oinstall 4096 02-22 13:34 bindrwxr-xr-x 2 arcsde oinstall 4096 02-22 13:48 etcdrwxr-xr-x 2 arcsde oinstall 4096 02-22 13:34 libdrwxr-xr-x 4 arcsde oinstall 4096 2010-01-09 localedrwxr-xr-x 3 arcsde oinstall 4096 02-22 13:34 tools
创建SDE的Schema
[arcsde@localhost ~]$ sdesetup -o install -d oracle11g -p sdeESRI ArcSDE Server Setup Utility Wed Feb 22 14:37:22 2012----------------------------------------------------------------Install or update ArcSDE, GDB schema objects: Are you sure? (Y/N): yChecking INSTALL privileges for geodatabase ...Current user has privilege to install geodatabase instance.Checking geodatabase XML datatype support...Underlying RDBMS database instance supports XML data type.Creating ArcSDE schema.....Successfully created ArcSDE schema.Installing St_Geometry ....Successfully installed St_Geometry.Creating geodatabase schema.....Successfully created GDB schema.Successfully installed ArcSDE components.Refer SDEHOME\etc\sde_setup.log for more details.
更新相关的lic,注意lic文件的所属用户,所属组以及读写权限

[arcsde@localhost ~]$ ll×Ü¼Æ 16-rwxrwxr-x  1 arcsde oinstall  527 02-22 09:42 ArcGIS Server10.ecpdrwxrwxr-x 10 arcsde oinstall 4096 2010-05-15 Helpdrwxr-xr-x  3 arcsde arcsde   4096 02-22 14:37 oradiag_arcsdedrwxrwxr-x  7 arcsde oinstall 4096 02-22 14:17 sdeexe100[arcsde@localhost ~]$ sdesetup -o update_key -d oracle11g -l /home/arcsde/ArcGIS\ Server10.ecp -p sdeESRI ArcSDE Server Setup Utility Wed Feb 22 14:41:41 2012----------------------------------------------------------------Successfully updated authorization key.
启动ArcSDE服务

[arcsde@localhost ~]$ sdemon -o start -p sdeUnable to get service name from '/home/arcsde/sdeexe100'.Set service name to use default 'esri_sde'-------------------------------------------------------ArcSDE 10.0  for Oracle11g Build 685 Fri May 14 12:05:43  2010-------------------------------------------------------ST_Geometry Schema Owner: (SDE) Type Release: 1007Instance initialized for ((sde)) . . .Connected to instance . . .DBMS Connection established...RDBMS:                           "Oracle"Instance Name:                   "esri_sde"IOMGR Process ID (PID):           25017ArcSDE Instance esri_sde started Wed Feb 22 14:43:12 2012
服务启动成功,使用ArcCatalog连接成功!