linux上安装arcgis 10_03安装ArcSDE 10

0
分享 2014-12-17
配置环境:
《linux上安装arcgis 10_02安装Oracle11gR2中配置的虚拟机
Red Hat Enterprise Linux 5_5 64-bit+Oracle11gR2.zip
安装人员: xubobo
安装时间: 2012-12-20
安装介质: ArcSDE10_UNIX_121100.iso 2.53G(选择其中的linux/oracle11g_64)
ArcSDE安装账户: arcsde/arcsde, 隶属于oinstall组。
数据库实例: orcl.
数据库上的sde账户:sde/sde。
虚拟机版本:
Red Hat Enterprise Linux 5_5 64-bit+Oracle11gR2+ArcSDE10+ArcGISServer10.zip
说明:主要参考 http://blog.csdn.net/linghe301/article/details/7282538,按照实际安装过程更改而来,同时增加有关依赖项的内容。
1:以oracle用户启动监听器,连接数据库,并启动orcl数据库。
[root@localhost ~]$ su - oracle //切换到oracle用户
[oracle@localhost ~]$ lsnrctl start //启动监听器[oracle@localhost ~]$ sqlplus sys/admin as sysdba //连接数据库

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 10:59:05 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup //启动数据库
2.创建操作系统级别的arcsde用户,密码设置为arcsde
[root@localhost ~]# useradd -d /home/arcsde -G oinstall -m arcsde //创建账户和目录
[root@localhost ~]# passwd arcsde //设置密码
Changing password for user arcsde.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# su - arcsde //切换到roacle用户
[arcsde@localhost ~]$
3. 创建SDE的用户、表空间、赋予权限。 
查看一下相关的SQL文件.注意登录的用户名和密码,以及dbf文件的位置(所在目录需存在)。 整理后的sql文件(create.sql)下载地址为:
http://pan.baidu.com/share/link?shareid=168208&uk=151831364
prompt * Granting of permissions by the SYS user in Oracle, on two packages
prompt * 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 sde
prompt * tablespace and user.

connect sys/admin@orcl as sysdba

prompt * Create the sde tablespace.
prompt * Before you run this script update LOCATION for the desired datafile pathname.
//创建SDE表空间,路径需要注意
create tablespace sde datafile '/home/oracle/app/oracle/oradata/ORCL/sde.dbf' size 400M extent management local uniform size 512K;

prompt * Create the sde user
prompt * The password for the sde user is set to "sde". You may
prompt * change this if you wish.

create user sde identified by sde
default 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 install
grant ADMINISTER DATABASE TRIGGER to sde;

exit;
以oracle用户登录连接数据库后,执行该SQL文件(执行语法SQL->@ /home/arcsde/create.sql,注意查看oracle用户对该文件是否有相关权限),创建的用户为sde,密码为sde。
[oracle@localhost ~]$ sqlplus sys/admin@orcl as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 11:44:53 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @ home/arcsde/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 install

Grant succeeded.

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr oduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options

测试sde用户是否可以连通
[oracle@localhost ~]$ sqlplus sde/sde@orcl

SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 11:46:18 2012

Copyright (c) 1982, 2009, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
3. 安装相关的ArcSDE软件
首先将ArcSDE光盘插入光驱,使用mount命令,如果条件允许也可以SSH工具直接传入
[root@localhost ~]# mount /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
mount: /dev/cdrom already mounted or /mnt/cdrom busy
mount: according to mtab, /dev/hdc is already mounted on /mnt/cdrom
[root@localhost ~]# cd /mnt/cdrom
[root@localhost sde]# ls
documentation_server htm install_db2.htm install_oracle.htm linux solaris
hpia 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] /mnt/cdrom/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]#
4. 设置环境变量 根据用户软件安装的位置以及Oracle软件安装的信息,添加arcsde用户的环境变量
[arcsde@localhost ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

#export PATH=$PATH:$HOME/bin
export ORACLE_BASE=/home/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export TNS_ADMIN=$ORACLE_HOME/network/admin
export SDEHOME=/home/arcsde/sdeexe100
export LD_LIBRARY_PATH=$SDEHOME/lib:/usr/lib:/lib:$ORACLE_HOME/lib
export PATH=$PATH:$HOME:$ORACLE_HOME/bin:$SDEHOME/bin
修改完毕环境变量,使之生效,然后测试一下是否生效
[arcsde@localhost ~]$ vi .bash_profile
[arcsde@localhost ~]$ . ./.bash_profile // 也可使用 source .bash_profile使其生效
[arcsde@localhost ~]$ echo $SDEHOME
/home/arcsde/sdeexe100
[arcsde@localhost sdeexe100]$
5.修改配置文件参数 在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 $ */
# s
# ESRI SDE Remote Protocol
# Note: uncomment the line below to use ESRI's default port
#
esri_sde 5151/tcp
在root用户下/etc/services文件一样添加 esri_sde 5151/tcp
[root@localhost ~]# vi /etc/services
6.检查依赖项
[arcsde@localhost ~]$ cd $SDEHOME/bin
[arcsde@localhost bin]$ ldd sdesetup
看看依赖项是否都已安装:如果有类似libXm.so.3-> not found的提示,则安装对应的依赖项。 如果不检查直接执行sdesetup 命令时出现以下错误:sdesetup: error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory. 安装相关依赖项:yum install openmotif*后重新检查ldd sdesetup。可能还会提示缺少libg2c.so.0,本地yum源中没有libf2c这个rpm,单独下载,点击安装即可。下载地址为:
http://pan.baidu.com/share/link?shareid=168207&amp;uk=151831364 执行setup安装还可能报以下错误:libclntsh.so.11.1 => not found。 原因是libclntsh.so.11.1位于oracle的安装目录中,arcsde没有读取权限造成的,需将/home/oracle/app/oracle目录的读取权限开放给oinstall组(arcsde隶属该组)。

7.sde软件安装目录授权 
执行sdesetup命令出错
[arcsde@localhost ~]$ cd $SDEHOME/bin
[arcsde@localhost bin]$ sdesetup -o
-bash: sdesetup command not found
查看一下sde软件的安装目录
[arcsde@localhost sdeexe100]$ ll
总计 20
drwxr-xr-x 2 root root 4096 02-22 13:34 bin
drwxr-xr-x 2 root root 4096 02-22 13:48 etc
drwxr-xr-x 2 root root 4096 02-22 13:34 lib
drwxr-xr-x 4 10018 kmem 4096 2010-01-09 locale
drwxr-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
总计 20
drwxr-xr-x 2 arcsde oinstall 4096 02-22 13:34 bin
drwxr-xr-x 2 arcsde oinstall 4096 02-22 13:48 etc
drwxr-xr-x 2 arcsde oinstall 4096 02-22 13:34 lib
drwxr-xr-x 4 arcsde oinstall 4096 2010-01-09 locale
drwxr-xr-x 3 arcsde oinstall 4096 02-22 13:34 tools
8.创建SDE的Schema
[arcsde@localhost ~]$ sdesetup -o install -d oracle11g -p sde

ESRI ArcSDE Server Setup Utility Wed Feb 22 14:37:22 2012
----------------------------------------------------------------
Install or update ArcSDE, GDB schema objects: Are you sure? (Y/N): y

Checking 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.
9.更新相关的lic,注意lic文件的所属用户,所属组以及读写权限
[arcsde@localhost ~]$ ll
-rwxrwxr-x 1 arcsde oinstall 527 02-22 09:42 Server10.ecp
drwxrwxr-x 10 arcsde oinstall 4096 2010-05-15 Help
drwxr-xr-x 3 arcsde arcsde 4096 02-22 14:37 oradiag_arcsde
drwxrwxr-x 7 arcsde oinstall 4096 02-22 14:17 sdeexe100

[arcsde@localhost ~]$ sdesetup -o update_key -d oracle11g -l /home/arcsde/Server10.ecp -p sde

ESRI ArcSDE Server Setup Utility Wed Feb 22 14:41:41 2012
----------------------------------------------------------------
Successfully updated authorization key.
10.启动ArcSDE服务
[arcsde@localhost ~]$ sdemon -o start -p sde
Unable 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: 1007

Instance initialized for ((sde)) . . .


Connected to instance . . .

DBMS Connection established...

RDBMS: "Oracle"
Instance Name: "esri_sde"

IOMGR Process ID (PID): 25017


ArcSDE Instance esri_sde started Wed Feb 22 14:43:12 2012
服务启动成功!

文章来源:http://www.cnblogs.com/esrichina/archive/2012/12/24/2830559.html

0 个评论

要回复文章请先登录注册