ksaitoの日記

日々試したことの覚え書き

CentOSでOracleを動かす。

移転しました。

自動的にリダイレクトします。

Oracle Database Express Edition 11g Release 2は、RPMパッケージで提供されているのでCentOSに入れるのは簡単です。

インストール

RPMパッケージをダウンロード&解凍してインストールするだけです。

$ sudo rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm 
[sudo] password for ksaito: 
準備中...                ########################################### [100%]
   1:oracle-xe              ########################################### [100%]
Executing post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

$

設定

ポートやsys, systemのパスワードを設定するとデータベースが起動します。

$ sudo /etc/init.d/oracle-xe configure

Oracle Database 11g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 11g 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]:

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 11g Express Edition to be started on boot (y/n) [y]:

Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.
$ 

クライアント設定

下記でクライアントの設定と接続を確認します。

$ . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
$ sqlplus system

SQL*Plus: Release 11.2.0.2.0 Production on 金 11月 2 20:56:47 2012

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

パスワードを入力してください: 


Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
に接続されました。
SQL>