配置環境:《Linux上安裝ArcGIS 10_02安裝Oracle 11gR2》中配置的虛擬機器 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
 
說明:主要參考 ,按照實際安裝過程更改而來,同時增加有關依賴項的內容。
=====================================================
Linux上安裝ArcGIS 10安裝系列文章:
Linux上安裝ArcGIS 10_01安裝Linux虛擬機器及yum源配置 
Linux上安裝ArcGIS 10_02安裝Oracle11gR2 
Linux上安裝ArcGIS 10_03安裝ArcSDE 10 
Linux上安裝ArcGIS 10_04安裝ArcGIS Server 10 
Linux上安裝ArcGIS 10.1_01安裝ArcGIS Server 10.1 
=====================================================
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://linux.bkjia.com/
使用者名稱與密碼都是www.bkjia.com
具體下載目錄在 /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