A collection of computer systems and programming tips that you may find useful.
 
Brought to you by Craic Computing LLC, a bioinformatics consulting company.

Monday, January 29, 2007

Configuring Oracle Database XE on Linux

I do all my database work in MySQL but I recently needed to setup a Rails application to use Oracle as a backend database. I didn't want to spend any of my money to do this, so I was pleased to see that Oracle make Oracle Database Express Edition (Oracle Database XE) available as free download.

You can find the software HERE but you will need to create an Oracle account first. Be warned that the Oracle site can be a little frustrating. You will want to download Oracle Database 10g Express Edition (either Western European or Universal version depending on your language requirements), which represents the Server, and Oracle Database 10g Express Client, which allows remote access to the server from another machine.

Oracle provides detailed documentation on these, including an Installation Guide, a Getting Started Guide and an Online Tutorial. While these are welcome, they tend to cover more options than you really need and so they can be a bit confusing. This note trims off that excess verbage and explains what I needed to do to install the database on a Linux Fedora 5 server.


Oracle XE Server Installation

1. Check the prerequisites in the Installation Guide
For hardware these are basically 512 MB memory, 1.5 GB disk.
You'll need at least 1024 MB of swap space. Check that with:
# free -m
If the total for the Swap line is less that 1024 then you need to add a swapfile of an appropriate size. I'll try and add a short note about that to this site when I get the chance - otherwise google for it.

You'll need the linux packages glibc (2.3.2 or higher) and libaio (0.3.96 or higher). You should have glibc already there but you'll have to install libaio (as root):
# yum install libaio
There are also a bunch of kernel parameters listed in the installation guide. I didn't have to mess with these.

2. Install the Downloaded RPM
# rpm -ivh oracle-xe-10.2.0.1-1.0.i386.rpm
Preparing... ########################################### [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.
If you've met all the prerequisites, the rpm should install smoothly

3. Run the Configuration Script
# /etc/init.d/oracle-xe configure
Accept the defaults for the two questions about ports, provide an administrator password and set the database to start on boot. The script will then do a load of work in the background to configure things properly.

This can take quite a while. Run top in another window if you want reassurance that things are happening.

4. Access the Database via its Web Site

On the server with the database, open up a browser and go to http://localhost:8080/apex.
Login as system and give the password that you set earlier. If you want to access this site from other machines on your network then go Administration->Manage HTTP Access and select Available from Local Server and Remote Clients.

You can enable a test database by going to Administration->Database Users->Manage Users and clicking on HR. Provide a password (such as 'hr') and change Account Status to unlocked and click the Alter User button. This test database is handy for testing later on.

5. Set Some Environment Variables

As root, open /etc/bashrc in an editor and add this line at the bottom of the file:
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
When you create a shell this will set a few environment variables that are required in order to access the database. These include LD_LIBRARY_PATH, ORACLE_HOME and ORACLE_SID. Look for them in the output of printenv when you create a new shell.

That's it for installing the server...


Oracle XE Client Installation

You would install this on a remote machine that wants to access the database server over the network.

1. Check the prerequisites

Nothing significant here, except the glibc and libaio packages, as above:
# yum install libaio
2. Install the Downloaded RPM

This gave me a couple of errors but they didn't appear to be a problem...
# rpm -ivh oracle-xe-client-10.2.0.1-1.0.i386.rpm
Preparing... ########################################### [100%]
df: `/usr/lib/oracle': No such file or directory
expr: syntax error
/var/tmp/rpm-tmp.86099: line 23: [: -lt: unary operator expected
1:oracle-xe-client ########################################### [100%]
Executing Post-install steps...
3. Setup the Environment Variables

As root, open /etc/bashrc in an editor and add this line at the bottom of the file:
. /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh
4. Access the Remote Server

If your paths are setup correctly then you can access sqlplus from a shell. Here I am accessing the HR test database on server testbed. The connect syntax is username/password@host
# sqlplus /nolog

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Jan 29 10:21:21 2007

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

SQL> connect hr/hr@testbed.int.craic.com
Connected.

SQL> select * from jobs;
You see a load of output returned by the server, indicating that everything is set up correctly.

That's it... fairly simple installations... you'll need to look elsewhere for guidance on actually creating tables and entering data. I'll add a guide to using Oracle as a backend database with Rails shortly.

31 comments:

Unknown said...

Professional trading signals delivered to your cell phone every day.


Weblogic Application Server training

Unknown said...

It's A Great Pleasure reading your Article. USMLE Thanks For Posting.

24Layouts said...

Thanks For Sharing Such an Informative Post...

Vizag Real Estate

Devi said...

Great blog.The article is so informative and this useful of developing my knowledge. oracle training in chennai

Kovalan J said...

Looking for best English to Tamil Typing online, make use of our site to enjoy Tamil typing and directly share on your social media handle. Tamil typing software free download

Mrbk30 said...

Very Informative blog thank you for sharing. Keep sharing.

Best software training institute in Chennai. Make your career development the best by learning software courses.

devops courses in CHennai
azure training in chennai
power bi training in chennai

Block said...

It has been simply incredibly generous with you to provide openly
what exactly many individuals would’ve marketed for an eBook to end
up making some cash for their end, primarily given that you could
have tried it in the event you wanted.
mysql dba training in chennai
unix course in chennai
top software training institute in Chennai

Block said...

I believe there are many more pleasurable opportunities ahead for
individuals that looked at your site.
node js course in chennai
oracle course in chennai
ASP Dot Net Training in Chennai

Elitebluetechnologies said...
This comment has been removed by the author.
Elitebluetechnologies said...

At Elite Blue we pride ourselves on providing the best web development services in the industry. Our team of experienced developers uses the latest technologies and innovative designs to bring your online vision to life. Whether you need a simple website or a complex e-commerce platform, we have the expertise to deliver outstanding results. Trust us to create a website that not only looks great but also meets your business needs and exceeds your expectations.

Elitebluetechnologies said...
This comment has been removed by the author.
Elitebluetechnologies said...
This comment has been removed by the author.
Elitebluetechnologies said...
This comment has been removed by the author.
Buy My Gadget said...

Are you looking to sell your used devices? At BuyMyGadget, we're a trusted and reliable company with over 7 years of experience in buying and selling pre-owned electronics. We pride ourselves on offering a fair and honest assessment of your device's value, and we'll never lowball you. Our fast and convenient service ensures you get paid quickly for your device. Discover the best value for your used electronics with BuyMyGadget.

Buy My Gadget said...

Are you looking to sell your used devices? At BuyMyGadget we're a trusted and reliable company with over 7 years of experience in buying and selling pre-owned electronics. We pride ourselves on offering a fair and honest assessment of your device's value, and we'll never lowball you. Our fast and convenient service ensures you get paid quickly for your device. Discover the best value for your used electronics with BuyMyGadget.

Power Electric NY said...

For all your electrical needs, Power Electric NY is your one-stop solution. Get in touch at (929) 422 9063 for 24/7 same-day service. With expert professionals and rapid response, they're dedicated to solving your electrical issues swiftly. Visit https://powerelectricnyinc.com to experience top-tier service and reliability.

Buy My Gadget said...

With over 25 years of excellence in serving the communities of Plantation, Fort Lauderdale, Hollywood, and Aventura FL, Dolphin Dental Care is dedicated to providing top-notch oral health services. Our experienced team, led by Dr. Ivan Parra, combines warmth, respect, and professionalism to ensure a lifetime of smiles. Discover the epitome of dental excellence at Dolphin Dental Care - your trusted partner for comprehensive and personalized dental services.

LRG Movers said...

LRG Movers is a Premier full service moving company that provides customers with the highest quality of service throughout NJ and is backed by over 40+ years of experience. We pride ourselves on providing exceptional customer service and ensuring that our customers’ belongings are handled with the utmost care.

Real Estate Advisor said...

Discover luxury redefined with Alyshomes https://alyshomes.com/ – where every property becomes a masterpiece. Alyshomes brings innovation to property marketing, making luxury accessible for every home. From urban condos to countryside estates, each detail is carefully curated to captivate potential buyers. Elevate your property experience with Alyshomes, where every home is a unique story waiting to be told.

barber said...
This comment has been removed by the author.
Elite Grout said...
This comment has been removed by the author.
Getme intech said...

At getmeintech Co
Dive into getmeintech —a journey to master the art of safeguarding our digital world. Each course is a thrilling adventure, equipping you with essential skills to combat evolving cyber threats. Choose the right program, and become a digital guardian. In today's tech-driven age, being a cybersecurity enthusiast is a necessity for a safer digital future. Happy learning!

Nexus Circular said...

Nexus Circular is an advanced recycling company at the centre of the circular economy. We accelerate circularity so people and the environment thrive. nexuscircular Co
has a viable solution today that is clean, circular and economical at full commercial scale.

Beds said...
This comment has been removed by the author.
Beds said...

Welcome to BedsHeaven.com, where the ordinary becomes extraordinary, and comfort reaches new heights. Here at BedsHeaven, we redefine the essence of uniqueness when it comes to the world of bedding. So, what exactly does "unique" mean in the realm of BedsHeaven.com?
Picture this: a tapestry of innovation woven into the fabric of your sleeping sanctuary. When we say "unique," we're not just talking about the standard fare of blankets and pillows. We're talking about a symphony of textures, a carnival of colors, and a fusion of design that transcends the mundane.
At Visit BedsHeaven.com>, uniqueness is more than a word; it's a lifestyle. It's the sensation of sinking into a cloud of pillows specially crafted to cradle you in a cocoon of bliss. It's the visual feast of bedding ensembles that don't just match your room but elevate it to a new aesthetic zenith.
Our definition of "unique" extends beyond the conventional boundaries. It's about personalization – the ability to tailor your bedding to reflect your style, your mood, your essence. Imagine having a palette of possibilities at your fingertips, where you can mix and match patterns, textures, and colors to curate a sleeping haven that is unmistakably yours.
But uniqueness at BedsHeaven.com is not just skin deep. It's ingrained in the very essence of our products. We source the finest materials, employ master craftsmen, and employ cutting-edge techniques to ensure that every piece is a masterpiece. This commitment to quality is what makes your experience with BedsHeaven.com truly singular.
Moreover, our commitment to sustainability adds an extra layer of uniqueness to your bedding. We believe in a world where luxury doesn't come at the cost of the environment. That's why we carefully select materials that are not only sumptuous but also eco-friendly, ensuring that your journey to dreamland leaves a lighter footprint.
So, when you encounter the word "unique" at it's not just a label. It's an invitation to explore a world where your sleep is elevated to an art form, where every night is a celebration of your individuality. Welcome to BedsHeaven.com, where the ordinary is left behind, and the extraordinary becomes your new standard.

airport said...

Calgary Airport's departure
Calgary Airport's departure vibe is pure excitement. Check-in buzzes with travelers and anticipation. The lounge is a mix of goodbyes, laughter, and solitary reflection. Duty-free tempts with last-minute indulgences.
At the departure gate, the thrill peaks. Views of planes taking off highlight the global adventure. Boarding is a synchronized dance towards the unknown. Onboard, the hum of engines blends with the exhilaration of takeoff, Calgary shrinking below, a city turning into a canvas of possibilities.
https://airportcalgary.com/yyc-departures/

belconi said...

Visit Belconi
Step into the enchanting world of blooms at Flower Heaven, proudly brought to you by Belconi Moment. Since its inception in 2014, Belconi online Florist has been more than just a flower and gift shop—it's a journey through petals and fragrances that linger in your heart. In 2016, we gracefully transitioned into the digital realm, spreading the magic of blossoms far and wide through our meticulously designed website.

At Visit Belconiwe don't just sell flowers; we curate experiences. With a professionally developed website boasting a repertoire of approximately 1200 products, we take pride in evolving with the times. Each year, we unveil new and trending products, carefully crafted based on the invaluable recommendations of our cherished customers.

What sets us apart is our unwavering commitment to providing unparalleled service. Our mantra is simple yet powerful: "Be happy and make everyone happy." It's more than just a slogan; it's the essence of what we do. So, welcome to our Flower Heaven, where joy blooms, and every petal whispers a story of happiness.


Restaurant said...

Inspired by Gulf Coast Ingredients

Discover the heart of Fairhope's culinary scene at Fairhope Seafood and Grill. Our cozy spot offers the freshest Gulf Coast seafood, from signature dishes to Oyster House specials. Join us for Oyster and Fairhope Happy Hour, where the coastal vibe meets handcrafted cocktails. Whether you're a brunch enthusiast or planning a special event, our commitment to quality shines through. Fairhope Seafood and Grill – where Southern charm meets top-notch seafood in every bite.

manisoft said...

This post does a great job of breaking down the earning potential for computer engineers! It's enlightening to see how factors like experience, location, and specialization impact salaries. For anyone considering a career in this field or looking to negotiate their salary, this information is invaluable. Thanks for sharing such detailed insights!

Insurefinalexpense said...

Burial Insurance: "Preparing for the future is essential, and our Burial Insurance can help ease the burden of funeral and burial expenses. By visiting our homepage, you can learn more about how our tailored coverage options can provide financial security for your loved ones during difficult times."
https://insurefinalexpense.com/

Insurefinalexpense said...

Burial Insurance: "Preparing for the future is essential, and our Burial Insurance can help ease the burden of funeral and burial expenses. By visiting our homepage, you can learn more about how our tailored coverage options can provide financial security for your loved ones during difficult times."
Burial Insurance

Archive of Tips