search
HomeDatabaseMysql TutorialUbuntu下安装ArcSDE 9.1 [图文]

虽然ESRI的官方文档如何安装ArcSDE已经很详细了(英文的),而且网上也有很多参考资料,但是这里还是针对自己的习惯以及针对Ubun

虽然ESRI的官方文档如何安装ArcSDE已经很详细了(英文的),而且网上也有很多参考资料,但是这里还是针对自己的习惯以及针对Ubuntu,用中文做一下说明,只是为了之后自己方便查阅。

1. 安装环境
我们安装的ArcSDE版本是9.1 for Oracle 10gR2,根据ESRI的官方文档,针对Oracle 9i的可以直接用来给10g,只不过有一些改动。
1. All references to Oracle9i can be changed to Oracle10gR2.
2. All references to the sdesetupora9i command should be substituted with sdesetupora10g.
3. All references to the sdeservice –o create –d oracle9i,SID command should be substituted with sdeservice –o create –d oracle10g,SID
4. UNIX installations/System Requirements

The ArcSDE 9.1 for Oracle10gR2 release is available on the following UNIX and Linux platforms:
Solaris 64bit
AIX 64bit
Red Hat Linux

2. 安装前的准备
a. 安装好Oracle 10g,在Ubuntu上安装Oracle 10g可以参考这篇文档。
b. 创建并设置好sde用户。
ArcSDE需要一个名为sde的用户,这个用户其他的属性都不重要,所以我将其所属的组设置为admin,以便于使用sudo。
官方文档上说shell应当设置为/bin/sh或者/bin/csh,我这里设置成bash,也可以。
同时,将sde加入oinstall组,是为了使之能运行一些oracle命令,同时使用oracle的一些动态链接库。
创建用户
sudo useradd -g admin -G oinstall -d /home/sde -s /bin/bash -m -k /etc/skel sde
设置密码
sudo passwd sde
输入你为sde用户设置的密码。
然后su sde,登录sde用户,或者直接退出当前用户,用sde用户登录。
c. 设置环境变量。
在.bashrc文件里修改(ubuntu默认.profile文件读取.bashrc文件,而且.bashrc文件在每次登录的时候都会读取),需要设置的环境变量如下:

SDEHOME #ArcSDE安装的地方
ORACLE_HOME #Oracle安装的地方
ORACLE_SID #Oracle SID的值
TNS_ADMIN #tnsnames.ora文件所在的地方
PATH $PATH:$SDEHOME/bin:$ORACLE_HOME/bin
LD_LIBRARY_PATH $SDEHOME/lib:/usr/lib:/lib:$ORACLE_HOME/lib (All platforms except HP and IBM)
SHLIB_PATH $SDEHOME/lib:/usr/lib:/lib:$ORACLE_HOME/lib (for HP only)
LIBPATH $SDEHOME/lib:/usr/lib:/lib:$ORACLE_HOME/lib (for IBM only)
TWO_TASK #value for TWO_TASK (if ArcSDE and Oracle on different machines)


如果Oracle数据库安装在本地,那么ORACLE_HOME和ORACLE_SID是需要设置并且起作用的,而,如果设置了TWO_TASK,那么它们就不起作用。
TWO_TASK指出在远程安装的Oracle的地址。如果在本地安装的Oracle,那么就不需要指出TNS_ADMIN和TWO_TASK。
注意:ArcSDE启动的时候,giomgr进程会读取$SDEHOME/etc/dbinit.sde文件中的设置,这会覆盖掉在.profile文件中的设置。
我的环境变量的设置如下:
umask 022export ORACLE_BASE=/opt/oracleexport SDEHOME=/home/sde/sdeexe91export ORACLE_HOME=/opt/oracleexport ORACLE_SID=GISexport PATH=$SDEHOME/bin:$ORACLE_HOME/bin:$PATHexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:$SDEHOME/lib:/usr/lib:/lib:$LD_LIBRARY_PATH:$ORACLE_HOME/lib/stubs

d. 创建Oracle数据库用户和tablespace。
i. 创建tablespace。
tablespace至少需要200M的空间,我们这里创建成2G,最大是unlimited。
由于Oracle推荐使用本地管理表空间,那么这里就设置成本地管理。关于本地管理和数据字典管理的定义和比较,请参阅下面的文档:

Locally Managed Tablespaces:
A tablespace that manages its own extents maintains a bitmap in each datafile to keep track of the free or used status of blocks in that data file. Each bit in the bitmap corresponds to a block or a group of blocks. When an extent is allocated or freed for reuse, the Oracle server changes the bitmap values to show the new status of the blocks.

Dictionary-Managed Tablespaces:
For a tablespace that uses the data dictionary to manage its extents, the Oracle server updates the appropriate tables in the data dictionary whenever an extent is allocated or deallocated.

Advantages of Locally Managed Tablespaces:
Locally managed tablespaces have the following advantages over dictionary-managed tablespaces:
Local management avoids recursive space management operations, which can occur in dictionary-managed tablespaces if consuming or releasing space in an extent results in another operation that consumes or releases space in a undo segment or data dictionary table.
Because locally managed tablespaces do not record free space in data dictionary tables, it reduces contention on these tables.
Local management of extents automatically tracks adjacent free space, eliminating the need to coalesce free extents.
The sizes of extents that are managed locally can be determined automatically by the system. Alternatively, all extents can have the same size in a locally managed tablespace.
Changes to the extent bitmaps do not generate undo information because they do not update tables in the data dictionary (except for special cases such as tablespace quota information).


关于这两种管理方式性能的比较可以参看
创建tablespace的语句是:
CREATE TABLESPACE sde DATAFILE'/opt/oradata/GIS/SDE/SDE.dbf' SIZE 2000MAUTOEXTEND ONNEXT 32MMAXSIZE UNLIMITEDLOGGINGEXTENT MANAGEMENT LOCAL UNIFORM SIZE 1MSEGMENT SPACE MANAGEMENT AUTO;

在做这部之前,需要用oracle用户登录,然后在/opt/oradata/GIS/下创建SDE文夹。
其中,EXTENT MANAGEMENT LOCAL是指本地管理方式,UNIFORM 是指对于一个表来说,,每次增加分配的空间大小(extent的大小)。
而NEXT是指对于tablespace来说,每次空间不够的时候再次分配的大小。
这里有一段话,可以表明这两者的一些区别:
“每次分配extent时是一个消耗资源的操作,当然是分配次数越少越好。在有些情况下,这也会直接影响性能。例如,在执行批量插入时,如果你的 extent太小,很快就要用完,就得再分配下一个,这时insert进程就只能等待系统去分配下一个extent.在这种情况下分配大一点的 extent会有助于提高性能。另外一点是extent是由连续的block组成的,extent大的话,数据存放会比较集中。这对于顺序读可能有利,但对于随机读则不见得有什么好处。并且现在数据文件基本上都是放在存储上,存储已经把空间分散到不同的磁盘上了。即使在oracle看来是连续的空间,在存储上实际也可能是分散的。
如果你的表确实很大,那就分配大一些的extent,如果表比较小就分配小一些的extent.”
我的理解是,如果tablespace的空间不足了,那么分配NEXT标明的大小。在tablespace空间足够的情况下,在往tablespace中的table里插入数据的时候,如果一次插入的数据大于UNIFORM的值,那么就需要再次分配UNIFORM规定的大小。
所以,如果每次插入的数据量比较大,那么可以考虑UNIFORM的值大一些。

SEGMENT SPACE MANAGEMENT应当设置为AUTO,这个网页
阐述了为什么设置成AUTO的好处。
其余参数可以参看Oracle的说明,这里推荐一个网页:
同时,这里有两幅Oracle提供的图,能够很清楚的看出如何创建和修改tablespace。
创建tablespace:

Ubuntu下安装ArcSDE 9.1 [图文]

修改tablespace:

Ubuntu下安装ArcSDE 9.1 [图文]

ii. 创建sde用户。
使用sqlplus,创建的sql语句是:
CREATE USER sdeIDENTIFIED BY 你的密码DEFAULT TABLESPACE sdeTEMPORARY TABLESPACE TEMP;

创建用户的sql语句很简单,关于其参数可以参看这个网页

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software