Installing DB2 Express-C 9.7.5 on Ubuntu 11.10

Printer-friendly versionPrinter-friendly version

If you want to install IBM's DB2 on Ubuntu 11.10, it's fairly straightforward. First, pop over to IBM's DB2 download page and grab whichever format of the DB2 Express-C archive you need. (In my case, it was "Linux 64-bit", which gave me a resulting tarball of db2exc_975_LNX_x86_64.tar.gz.)

Unload the tarball wherever you want, then move into the resulting directory and (as root) run the DB2 installer script:

$ tar xvjf db2exc_975_LNX_x86_64.tar.gz
$ cd special_27924_linuxamd64_expc
$ sudo ./db2setup

When you get the graphical Launchpad, select "Install a Product" from the left-hand menu, then "Install New" and, to keep things simple, just accept all of the pre-ordained defaults on all of the dialog screens.

When the setup is complete, while it's optional, it wouldn't hurt to run the installation validation script:

$ sudo /opt/ibm/db2/V9.7/bin/db2val -a
DBI1379I  The db2val command is running. This can take several minutes.


DBI1335I  Installation file validation for the DB2 copy installed at
      /opt/ibm/db2/V9.7 was successful.


DBI1339I  The instance validation for the instance db2inst1 was
      successful.



DBI1343I  The db2val command completed successfully. For details, see
      the log file /tmp/db2val-01_29_15:50:50.log.
$

That all looks promising, so log in as your official DB2 user account and verify that your account environment has the essential DB2 information:

$ su - db2inst1
$ env
DB2INSTANCE=db2inst1
USER=db2inst1
... etc etc ...
$

Your environment information is set via the setup script ~/sqllib/db2profile, which should already be sourced from your .profile startup file:

# The following three lines have been added by IBM DB2 instance utilities.
if [ -f /home/db2inst1/sqllib/db2profile ]; then
    . /home/db2inst1/sqllib/db2profile
fi

Finally, create a test database and try to connect to it:

$ db2 create database test
DB20000I  The CREATE DATABASE command completed successfully.
$ db2 connect to test

   Database Connection Information

 Database server        = DB2/LINUXX8664 9.7.5
 SQL authorization ID   = DB2INST1
 Local database alias   = TEST
$

At that point, you're good to go.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <br> <pre> <h1> <h2> <h3> <h4>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.

We know

We're aware of the time and budget pressures at most companies, normally accompanied by the plaintive cry from management of, "Yes, I know we need training on that topic, but I just can't afford to send my entire team away for three (or four or five) days to get it!" And that's where we come in.

Choices!

The main focus at Crashcourse is to offer a choice of intense, 1-day, hands-on courses on specific topics in Linux and open source. And given that we already have the laptops for the delivery of that training, the idea is to show up early, set up a classroom, then spend the day teaching exactly the topic you're interested in. No travel time, and no wasted classroom time.

Customization

If we don't already have a course that addresses the topic you're interested in, drop us a note and we'll see what we can do -- our content providers can almost certainly put together a course that's precisely what you're after.

The difference

While there are a variety of sources for Linux and open source training, we at Crashcourse are taking a slightly different approach. Our philosophy is simple: exactly the training you want, and no wasted time or travel to get it.