05 January 2011

Create a Virtual machine with Fedora running Oracle XE

It is a good idea to build servers for testing in seperate virtual machines, in order to have a seperated environment. Here we ll create Fedora Virtual Machine with VirtualBox running Oracle XE
  1. Get your Fedora 14 VirtualBox image from http://virtualboxes.org/images/fedora/.
    Active user account(s) (username/password): root/tooroot, fedora/reverse
  2. Open "Virtual Media Manager" of VirtualBox and DnD in it the Fedora's VDI (VDI stands for something like VirtualBox Disk Image) that you just downloaded (after extracting it from rar)
  3. Create a Fedora Machine (if you name it FedoraSomething, eg Fedora14, will auto set the correct type)
  4. Set to use the existing Hard Disk that you configured above.
  5. Do not forget to set NAT using my related post VirtualBox: Configure networking for running server on virtual guest. In this case we are using the NAT way (we are going NATs :) ).
    In our case we want to hit 1522 in my host machine in order to access the 1521 in my guest. So we must run the command:
    VBoxManage modifyvm "Fedora14" --natpf1 "guestdb,tcp,,1522,,1521"

Install OracleXE
1.
Download Oracle XE using Firefox
http://www.oracle.com/technetwork/database/express-edition/downloads/102xelinsoft-102048.html
(Firefox will save it in ~/Downloads)

2.
From home dir
$ rpm -ivh ./Downloads/oracle-xe-univ-10.2.0.1-1.0.i386.rpm

3.
When the aboce finished you ll be prompted to
$ /etc/init.d/oracle-xe configure
in order to enter the following configuration information:
  1. A valid HTTP port for the Oracle Database XE graphical user interface (the default is 8080)
  2. A valid port for the Oracle database listener (the default is 1521)
  3. A password for the SYS and SYSTEM administrative user accounts
  4. Whether you want the database to start automatically when the computer starts. If you enter Yes, then the database starts immediately
I ve used the default values.

4.
Finally, set machine to run in Runlevel 3 in order to minimize mem consuption
Open termnal, login as su, and run
$init 3

4b.
If you want you can even better set default runlevel to be 3 and reduce memory of Virtual machine to be below 250MB.

To set default runlevel to 3
Go to  /etc/inittab file and set
id:3:initdefault:
eg.
# Default runlevel. The runlevels used by RHS are:
#   0 - halt (Do NOT set initdefault to this)
#   1 - Single user mode
#   2 - Multiuser, without NFS (The same as 3, if you do not have networking)
#   3 - Full multiuser mode
#   4 - unused
#   5 - X11
#   6 - reboot (Do NOT set initdefault to this)
#
id:3:initdefault:

Then in VirtualBox settings set Fedora image to use 250MB RAM


Dig more:
http://serafeimk.blogspot.com/ (Special thanx to Serafim for his precious tips!)
http://virtualboxes.org/images/fedora/.
http://download.oracle.com/docs/cd/B25329_01/doc/install.102/b25144/toc.htm#CIHHJEHF

No comments:

Post a Comment

You might also like:

Related Posts Plugin for WordPress, Blogger...
There was an error in this gadget