Oracle Database 10g Express Edition

備忘録としてインストールしたときのメモ。

  • libaioのインストール

事前にlibaioをインストールする必要があったので、rpmを落としてきてインストールする。

# wget http://download.opensuse.org/distribution/10.3/repo/oss/suse/i586/libaio-0.3.104-74.i586.rpm
# rpm -ivh libaio-0.3.104-74.i586.rpm
  • oracle-xeをインストール
# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
This system does not meet the minimum requirements for swap space.  Based on
the amount of physical memory available on the system, Oracle Database 10g
Express Edition requires 1024 MB of swap space. This system has 509 MB
of swap space.  Configure more swap space on the system and retry the installation.
error: %pre(oracle-xe-univ-10.2.0.1-1.0.i386) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping oracle-xe-univ-10.2.0.1-1.0
  • swapが足りないようなので、追加する。
# mkdir /swap
# cd /swap
# dd if=/dev/zero of=/swap/swap1 count=2048000
2048000+0 records in
2048000+0 records out
1048576000 bytes (1.0 GB) copied, 23.9741 s, 43.7 MB/s
# chmod 600 /swap/swap1
# mkswap /swap/swap1 1024000
Setting up swapspace version 1, size = 1048571 kB
no label, UUID=9a71a88b-7b0a-4f54-8f20-e7f6e7bfc7f0
# swapon /swap/swap1
  • fstabに追加。
# vi /etc/fstab
/swap/swap1          swap                 swap       defaults              0 0
  • インストールの再開
# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
Preparing...                ########################################### [100%]
   1:oracle-xe-univ         ########################################### [100%]
Executing Post-install steps...
insserv: script mysql2: service mysql already provided!
oracle-xe                 0:off  1:off  2:off  3:on   4:off  5:on   6:off
You must run '/etc/init.d/oracle-xe configure' as the root user to
configure the database.
# /etc/init.d/oracle-xe configure

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 <Enter> to accept the defaults.
Ctrl-C will abort.

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

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]:

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:18080/apex"
  • DBA権限の付与

DBA権限を持つユーザー(仮にuseraとする)はdbaグループに追加する必要がある。

# usermod -G dba usera
  • ユーザの環境変数の設定
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export ORACLE_SID=XE
  • systemユーザーのパスワードを変更する。

なぜか、インストール時に指定したパスワードでログインできなくなってしまったので、変更しとく。

$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on 日 7月 5 03:45:08 2009

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

SQL> connect / as sysdba
SQL> alter user system identified by *****;

ユーザーが変更されました。

SQL> exit
  • 停止、起動の確認。
# service oracle-xe stop
Shutting down Oracle Database 10g Express Edition Instance.
Stopping Oracle Net Listener.
# service oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 10g Express Edition Instance.
homeserver/oraclexe.txt · 最終更新: 2009/07/05 03:52 by whiteapple
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0 openSUSE