Archive

Posts Tagged ‘Linux’

Installing Oracle 10g in Ubuntu 9.10

April 28th, 2010

What happens when you try to install Oracle Database XE Beta on a new Linux distribution? You learn a whole lot!

I came to these words by Todd Trichler in his post Installing Oracle Database XE on Debian, Ubuntu, and Kubuntu. And yes indeed, I learned a lot. I want to share what I did to get Oracle 10g working in my Ubuntu 9.10.

Firstly, I got the Debian distribution of Oracle 10g and saved it in the Downloads directory.

Then, I ran the following command and was little disappointed with the outcome.
sujan@ubuntu:~/Downloads$ sudo dpkg -i oracle-xe_10.2.0.1-1.0_i386.deb

[sudo] password for sujan:
Selecting previously deselected package oracle-xe.
(Reading database … 137338 files and directories currently installed.)
Unpacking oracle-xe (from oracle-xe_10.2.0.1-1.0_i386.deb) …
This system does not meet the minimum requirements for swap space. Based on
the amount of physical memory available on the system, Oracle Database 10g
Express Edition requires 1024 MB of swap space. This system has 227 MB
of swap space. Configure more swap space on the system and retry the installation.

^C

I realized that I was running short of 797MB in my swap space and did the following to increase the swap space.
sujan@ubuntu:~/Downloads$ sudo dd if=/dev/zero of=/swapfile bs=1M count=800

800+0 records in
800+0 records out
838860800 bytes (839 MB) copied, 17.0841 s, 49.1 MB/s

sujan@ubuntu:~/Downloads$ sudo mkswap /swapfile

mkswap: /swapfile: warning: don’t erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 819196 KiB
no label, UUID=8189de30-d6ae-45c0-aab8-161a666c1f9f

sujan@ubuntu:~/Downloads$ sudo swapon /swapfile

Now, when I ran the “top” command, I could see that my swap space was updated.
sujan@ubuntu:~/Downloads$ top

top - 12:07:17 up 3:58, 2 users, load average: 0.34, 0.35, 0.41
Tasks: 187 total, 1 running, 186 sleeping, 0 stopped, 0 zombie
Cpu(s): 15.1%us, 5.0%sy, 0.5%ni, 79.3%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 2052472k total, 2002192k used, 50280k free, 335096k buffers
Swap: 1081328k total, 29548k used, 1051780k free, 890180k cached

Now it was time to give another try.
sujan@ubuntu:~/Downloads$ sudo dpkg -i oracle-xe_10.2.0.1-1.0_i386.deb

(Reading database … 95%
dpkg: warning: files list file for package `oracle-xe’ missing, assuming package has no files currently installed.
(Reading database … 137338 files and directories currently installed.)
Preparing to replace oracle-xe 10.2.0.1-1.0 (using oracle-xe_10.2.0.1-1.0_i386.deb) …
Unpacking replacement oracle-xe …
dpkg: dependency problems prevent configuration of oracle-xe:
oracle-xe depends on libaio (>= 0.3.96) | libaio1 (>= 0.3.96); however:
Package libaio is not installed.
Package libaio1 is not installed.
dpkg: error processing oracle-xe (–install):
dependency problems - leaving unconfigured
Processing triggers for desktop-file-utils …
Processing triggers for man-db …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Errors were encountered while processing:
oracle-xe

I then installed the libaio1 package.
sujan@ubuntu:~/Downloads$ sudo apt-get install libaio1

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.31-14 linux-headers-2.6.31-14-generic
Use ‘apt-get autoremove’ to remove them.
The following NEW packages will be installed:
libaio1
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 9,346B of archives.
After this operation, 77.8kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com karmic/main libaio1 0.3.107-3ubuntu1 [9,346B]
Fetched 9,346B in 0s (14.3kB/s)
Selecting previously deselected package libaio1.
(Reading database … 139719 files and directories currently installed.)
Unpacking libaio1 (from …/libaio1_0.3.107-3ubuntu1_i386.deb) …
Setting up libaio1 (0.3.107-3ubuntu1) …

Setting up oracle-xe (10.2.0.1-1.0) …
update-rc.d: warning: /etc/init.d/oracle-xe missing LSB information
update-rc.d: see
Executing Post-install steps…
-e You must run ‘/etc/init.d/oracle-xe configure’ as the root user to configure the database.

Processing triggers for libc-bin …
ldconfig deferred processing now taking place

I had to obey what it said. Here was what I did.
sujan@ubuntu:~/Downloads$ sudo /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]:8090

[[You can leave the default port 8080. I chose 8090 because I love tomcat when it is running in 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 10g Express Edition to be started on boot (y/n) [y]: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:8090/apex”

sujan@ubuntu:~/Downloads$

Seems it was all set now. I opened Firefox and pointed it to “http://127.0.0.1:8090/apex”. Worked as expected. I entered “system” as username and ****** as password and it worked.

Hope it works with you as well.

Cheers!!!

Sujan Installation and Configuration, Technology , , , ,