It’s now or never


Oracle Database ExpressをCentOSにインストールする

Oracle Databaseは、基本的には商用(有償)のDBMSですが無償で使えるパッケージが有るみたいなので試してみます。



sudo yum install -y unzip


sudo yum install -y glibc make gcc binutils libaio libaio-devel bc net-tools
sudo dd if=/dev/zero of=/swap bs=1M count=2048
sudo chmod 600 /swap
sudo mkswap /swap
sudo swapon /swap
cat /proc/swaps

vi /etc/fstab

/swap swap swap defaults 0 0
sudo rpm -ivh Disk1/oracle-xe-11.2.0-1.0.x86_64.rpm
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.



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.

// デフォルトのHTTPポート番号
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]:

/etc/init.d/oracle-xe: line 405: netstat: command not found

// SYSTEMユーザーのパスワード
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]:y

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


  • コマンドの読み込み
. /u01/app/oracle/product/11.2.0/xe/bin/
  • sqlplusでアクセス
sqlplus system
  • パスワードを聞かれるため、先程設定したものを入力
sqlplus system

SQL*Plus: Release Production on 日 3月 26 10:49:30 2017

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


Oracle Database 11g Express Edition Release - 64bit Production
  • 正しくログインできれば設定完了