CentOSにOracle XEを入れる+インストール後の管理用HTTPポートの変更

Oracle XEのダウンロードまでの進め方は下記サイトに詳しく書かれています

無料で使える「Oracle Database XE」をインストール
http://builder.japan.zdnet.com/sp/oracle-db-2008/story/0,3800086786,20375936,00.htm


CentOSに入れるのでLinux用パッケージをダウンロードしましょう。

インストール

[root@centos5 src]# 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.


[root@centos5 src]# /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]: 【Enter】 管理用HTTPポート番号を変更する場合はここで8081などに変更します Specify a port that will be used for the database listener [1521]:【Enter】 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: ********(SYS/SYSTEMユーザ用パスワード) 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:8080/apex"

インストール後の管理用HTTPポートの変更

参考

Changing the Listener Port Number for HTTP Connection Requests
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/network.htm#BHCBABJB

[root@centos5 src]# su - oracle
$ source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh

$ sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on 日 10月 18 12:50:39 2009

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

SQL> connect system/******** (configureで設定したパスワード)
接続されました。
SQL> 
SQL> exec dbms_xdb.sethttpport(8081)

PL/SQLプロシージャが正常に完了しました。

SQL> quit
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Productionとの接続が切断されました。

$ exit
[root@centos5 ~]# 

リモートから管理用HTTPポートにアクセスできるようにする

標準ではローカルホストからしかアクセスできないようになっていますのでこれを変更します

参考

Changing the Listener Port Number for HTTP Connection Requests
http://download.oracle.com/docs/cd/B25329_01/doc/admin.102/b25107/network.htm#BHCBABJB

のすぐ下に Enabling Remote HTTP Connection with the Manage HTTP Access Page の記事があります

Web管理画面から、管理>ページ右側メニューのHTTPアクセスの管理 で変更できます。