nosyingnothing 2014-04-09
配置环境:《Linux上安装ArcGIS 10_02安装Oracle 11gR2》中配置的虚拟机 Red Hat Enterprise Linux 5_5 64-bit+Oracle11gR2.zip
=====================================================
Linux上安装ArcGIS 10安装系列文章:
=====================================================
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)下载地址为:
具体下载目录在 /2014年资料/4月/9日/Linux上安装ArcGIS 10_03安装ArcSDE 10
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 <span style="color: rgb(255, 0, 0);" data-mce-mark="1">sys/admin</span>@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> @<span style="color: rgb(255, 0, 0);" data-mce-mark="1"> home/arcsde/create.sql</span>;
* 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