Oracle XEをTurboLinux Fujiにインストールする!(swapなし状態からinstallする方法)

Oracle XEインストール画面

Linuxでも、RedhatやMiracleなどすでにOracleが動く環境にあるOSにインストールしても面白みがありません。
そこで、自宅マシン TurboLinux FujiにOracle XEをインストールしてみました。(kernel 2.6.13系)
(っつーか、TurboLinuxが単純に好きだからです)
ちなみに、TurboLinux10シリーズにインストールした場合は、
[root@tl10f]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
エラー: Failed dependencies:
libaio >= 0.3.96 is needed by oracle-xe-univ-10.2.0.1-1.0
となってしまい、開発マシンの環境を変えたくなかったのであきらめました。
(libaioはネイティブの非同期I/O機能なので、変えたらやばそうだから...)

さて、TurboLinux Fujiですが、インストール開始すると、
[root@home DISK]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
準備中... ########################################### [100%]
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 0 MB
of swap space. Configure more swap space on the system and retry the installation.
エラー: %pre(oracle-xe-univ-10.2.0.1-1.0.i386) スクリプトの実行に失敗しました。 終了ステータス 1
エラー: install: スクリプト %pre の実行に失敗しました (2)。oracle-xe-univ-10.2.0.1-1.0 をスキップします。

えぇーっっ、swapがないとダメって言われても....もうDISKは全部使っちゃってるんだけど..

しょうがないので、スワップ領域をファイルとして確保します。
スワップ用ファイルを作成 (/tmp/swap)
[root@home tmp]# dd if=/dev/zero of=/tmp/swap bs=1024 count=1300000
読み込んだブロック数は 1300000+0
書き込んだブロック数は 1300000+0
[root@home tmp]# ls -lh

  • rw-rw-r-- 1 root root 1.3G 3月 3 23:50 swap

作成したファイルをスワップ領域として初期化
[root@home ~]# mkswap /tmp/swap
Setting up swapspace version 1, size = 1331195 kB
スワップ領域を有効化
[root@home ~]# swapon /tmp/swap
スワップ領域の確認
[root@home ~]# cat /proc/swaps
Filename Type Size Used Priority
/tmp/swap file 1299992 0 -1

swap領域が準備できたので、再度Oracle XEをインストール!!!
[root@home DISK]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm
準備中... ########################################### [100%]
1:oracle-xe-univ ########################################### [100%]
Executing Post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to
configure the database.

メッセージに従って、 /etc/init.d/oracle-xe configure を実行します。
(HTTPポートと、リスナーポート、パスワード、boot時にoracle XE起動するかどうかの確認
基本的にenter,enter,[パスワード],[再度パスワード],enterでいけます)
)
[root@home DISK]# /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 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]:y

Starting Oracle Net Listener...Done
Configuring Database...
tarting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"

で、http://127.0.0.1:8080/apex

自動起動yにすると、以下のような設定になっています。
[root@home ~]# chkconfig --list oracle-xe
oracle-xe 0:オフ 1:オフ 2:オン 3:オン 4:オン 5:オン 6:オフ
今回は自宅のlinuxマシンなので、いつもはoracle-xe起動させたくないので、offにします
[root@home ~]# chkconfig --level 2345 oracle-xe off
[root@home ~]# chkconfig --list oracle-xe
oracle-xe 0:オフ 1:オフ 2:オフ 3:オフ 4:オフ 5:オフ 6:オフ

以上、TurboLinux Fujiでもまったく問題はありませんでした。日本語もOKです。