Fedora11へのOracle Database 10g Express Edition for Linux x86のインストール

Fedora 11にOracle Database 10g Express Edition for Linux x86をインストールする手順です。

目次

  • rpmファイルのダウンロード
  • インストール
  • ホスト名の確認
  • サーバの初期設定
  • 起動
  • 終了
  • 環境変数の設定

rpmファイルのダウンロード

Oracle Technology network(OTN) Japanのダウンロードページより、インストール用のrpmファイルをダウンロードします。
なお、rpmファイルのダウンロードにはoracle.comのアカウントが必要ですので、あらかじめ作成しておきましょう。

(1) Oracle Technology Network(OTN) Japanに接続します。

(2) 画面上部のメニューより[ダウンロード]-[Database]を選択します。


(3) 「Oracle Database 10g Express Edition for Linux x86」リンクをクリックします。

(4) 「ライセンスに同意する」ラジオボタンを選択します。

(5) 「Oracle Database 10g Express Edition (多言語対応)」の下にある「oracle-xe-univ-10.2.0.1-1.0.i386.rpm」をクリックします。

(6) oracle.comのユーザ名/パスワードを入力して「Continue」ボタンをクリックすると、ダウンロードが開始されます。

インストール

rpmコマンドを実行してOracleのインストールを行います。

# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm 

ホスト名の確認

Oracleの初期設定を行う前に、/etc/hostsにホスト名が定義されていることを確認します。
後続の初期設定を正しく行うために、ホスト名が定義されている必要があります。

(1) hostnameコマンドを実行し、ホスト名は確認します。
# hostname
MYPC
(2) /etc/hostsでホスト名が定義されていることを確認します。

もしホスト名が定義されていない場合は、/etc/hostsを編集して定義を追加します。

# cat /etc/hosts
127.0.0.1     localhost
192.168.1.25  MYHOST

サーバの初期設定

以下の項目を初期設定するため、Oracleの起動スクリプトを実行します。

  • Oracle Application ExpressのHTTPポート番号
  • データベースのポート番号
  • SYSアカウントとSYSTEMアカウントのパスワード
  • システム起動時にOracleを開始するかどうか
# /bin/service oracle-xe confugure

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]:Oracle Application ExpressのHTTPポート番号 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:SYSアカウントとSYSTEMアカウントのパスワード Confirm the password:パスワードの再入力 Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:システム起動時にOracleを開始するかどうか 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:8080/apex"

起動

Oracleを起動するには、以下のコマンドを実行します。

# /sbin/service oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 10g Express Edition Instance.

停止

Oracleを停止するには、以下のコマンドを実行します。

# /sbin/service oracle-xe stop
Shutting down Oracle Database 10g Express Edition Instance.
Stopping Oracle Net Listener.

環境変数の設定

oracleへの接続に必要な環境変数を設定するため、一般ユーザの.bashrcに以下を追記します。

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh