Install Oracle XE 10gr2 on Ubuntu 10.4

Oracle XE 10.2 licence limitations
Before you install, please consider the restrictions below. Oracle XE is offered as a free server for developers and small applications. The only way to overcome the limitations indicated below is to use the standard or enterprise editions.

(a) XE Server will use only one CPU
- If installed on a computer with more than one CPU (including dual-core CPUs), Oracle XE will consume, at most, processing resources equivalent to one CPU. In other words, even with available CPUs, Oracle XE will not do concurrent processing of CPU-intensive queries.

(b) Only one instance per computer
- Only one installation of Oracle XE can be performed on a single computer. This will not affect any existing installation or new installations of Standard or Enterprise Editions. In addition, users can run only one instance of Oracle XE on each individual computer.

(c) Maximum 4Gb of user data
- The maximum amount of user data in an Oracle XE database cannot exceed 4Gb. (In the oracle XE 11g - beta version, this limit was increased to 11Gb). If the user data grows beyond the 4Gb limit, then an ORA-12592 error will occur.

(d) Maximum 1Gb RAM
- An Oracle XE database will use at most 1Gb of RAM, even if more is available.

(e) No native support for HTTPS
- HTTPS is not supported natively with the HTTP listener built into Oracle Database XE. If you want HTTPS support, use an alternative Web listener, such as Apache, that does provide HTTPS support, and provide proxies for the URLs provided by Oracle Database XE.

With the limitations indicated above and with the idea of providing a RDBMS with a small footprint, it is not surprising that many of the features available in the Standard and Enterprise editions are not included with Oracle XE. Some of these are partitioning, OLAP, clusterware, the "Packs" (change and configuration management, diagnostic and tuning). See the full list here.

Installation Requirements
(a) Kernel requirements
The installation program checks for the kernel parameter settings below. If the current parameter values are less than the values listed below, they will be modified by the installation program.
semmsl, semmns, semmni, semopm250, 32000, 128, 100
shmax, shmmni, shmall536870912, 4096, 2097152

(b) Required packages
You need to have glibc and libaio installed.

Download the software
You need to be logged in on your OTN account. You may use the link below:
Download the debian package (.deb).

(a) To install the package, run the command below. The installation program automatically creates user oracle, if it not yet exists.

(b) Alternative Installation mode
On Debian-based systems such as Ubuntu, you can download and install the .deb package through these steps:

(1) Edit the /etc/apt/sources.list and add:
# Repository for Oracle XE
deb unstable main non-free

(2) install with:
$ sudo apt-get update
$ sudo apt-get install oracle-xe

(c) Configuring default ports, passwords, and startup options.
When prompted, run the command below. It allows you to change the default http and listener ports, set up the initial password for SYS and SYSTEM, and decide whether the server will be automatically started during boot:

Oracle Database 10g Express Edition Configuration
This will configure on-boot properties of Oracle Database 10g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:

Specify a port that will be used for the database listener [1521]:

Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:n

Starting Oracle Net Listener...Done
Configuring Database...
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.

Set the Oracle XE Environment Variables

bash shell configuration scripts:
// executed during initial login
// executed in each new terminal window

To connect to the XE server you must set your environment variables. One way to do it is to edit your .bashrc login script and include the line below. After this when you open a new terminal window the environment variables will be automatically set.

$ vi ~/.bashrc
# paste the two lines below at the end of the file:
# set Oracle XE environment variables
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/ 

If you are using the bash shell, the execution of the script may produce the error message below:
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/ 114: [[: not found

To fix this problem, edit the file indicated in the error message. As root (or though sudo) you need to tell the script to use the proper shell. In this case:

$ sudo vi /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/
change the first line in the file 
from #! /bin/sh 
to   #! /bin/bash 

Acessing the database
After the installation, the database should be up and running.
To use the XE database, you can go to the Database Home Page in the Oracle Database XE graphical user interface.:
http://host:port/apex or httpL// (if you kept the default port for the http listener)

The installation creates a database and an instance named XE.

Starting and Shutting down
You can startup the database either through the Desktop Menus:
Applictations -> Oracle Database 10g Express Edition -> Start Database
or using SQL*Plus:
# Log in as a user who is a member of the dba group
$ sqlplus / as sydba
SQL> startup

If all went well, you should see:

ORACLE instance started.

Total System Global Area 805306368 bytes
Fixed Size 1261444 bytes
Variable Size 218103932 bytes
Database Buffers 583008256 bytes
Redo Buffers 2932736 bytes
Database mounted.
Database opened.

Network connections
The Listener manages database (default port 1521) and HTTP (default port 8080) connections.
To manage the listener (status/start/shutdown) you need to be logged in as oracle.
LSNRCTL> start

Starting /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version - Production
System parameter file is /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Log messages written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=niels.blump)(PORT=1521)))

Version TNSLSNR for Linux: Version - Production
Start Date 13-JAN-2011 09:14:42
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: xxxx
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary...
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

No comments:

Post a Comment