Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
CARE

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 54 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

HOWTO Home

Current HOWTO: DB2-HOWTO


Installing DB2 Version 8.2 on Ubuntu 5.04 'Hoary Hedgehog'

14. Installing DB2 Version 8.2 on Ubuntu 5.04 'Hoary Hedgehog'

Before proceeding, please ensure that you have read Section 3 and Section 4.

These notes are based on a single-partition installation on Ubuntu 5.04. As Ubuntu uses .deb packages, we use the alien package conversion utility to convert and install the DB2 RPM packages directly.

14.1. Pre-installation notes

Ensure that you have installed alien:

sudo apt-get install alien
If you want to run a multiple-partition environment, you will need to install the pdksh package.

14.2. Installation notes

The RPM packages supplied with the DB2 install CD contain dependency listings that cannot be satisfied inside a Ubuntu environment, because Ubuntu does not use RPM as a native packaging method. To overcome these dependencies, you need to modify the db2_install script to ignore dependencies and force the installation of DB2 onto your system using alien.

Perform the following steps to modify the db2_install script and install the product:

  1. Open the ~/db2/linux/db2_install script in your text editor and modify the following lines

    From:

    ( rpm -ivh  ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1; \ 
       echo $? > ${TMPRC?} ) | tee -a ${DB2INSTLOG?}

    To:

    ( alien -dic  ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1; \ 
       echo $? > ${TMPRC?} ) | tee -a ${DB2INSTLOG?}

  2. Issue the following command to begin installing DB2:

    sudo ./db2_install

  3. The DB2 installer prompts you to enter the keyword of the product you want to install. for example, issuing the db2_inst command for the DB2 UDB Express Edition for Linux install displays the following screen:

    
Specify one or more of the following keywords, 
    separated by spaces, to install DB2 products.
    
     Keyword        Product Description
     DB2.EXP        DB2 UDB Express Edition for LINUX
    
    Enter "help" to redisplay product names.
    
    Enter "quit" to exit.
    
    ***********************************************************
    DB2.EXP
    

The DB2 installer will now install many RPM packages into the /opt/IBM/db2/V8.1/ directory.

14.3. Post-installation notes

Now that you have installed DB2, you need to create the groups, users, DB2 Administration Server instance, and database instance for your database. The following instructions create users and groups with the default names used in the DB2 documentation (dasadm1, db2inst1, db2fenc1).

  1. Create the required groups:

    
sudo groupadd -g 999 db2iadm1
    sudo groupadd -g 998 db2fadm1
    sudo groupadd -g 997 dasadm1
    

  2. Create the required users and assign them to their corresponding groups:

    
sudo useradd -u 1004 -g db2iadm1 -m -d /home/db2inst1 db2inst1 
    sudo useradd -u 1003 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1 
    sudo useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1
    

  3. Create the DB2 Administration Server:

    sudo /opt/IBM/db2/V8.1/instance/dascrt -u dasusr1

    Create the DB2 database instance:

    sudo /opt/IBM/db2/V8.1/instance/db2icrt -a server -u db2fenc1 db2inst1

14.3.1. Enabling remote connections

When you perform a manual install of DB2, the installer does not automatically set up the communication protocols for your DB2 server. To enable connections to your DB2 server from remote clients, perform the following steps:

  1. Set the port on which DB2 should communicate. Ensure that you select a port that is not blocked by a firewall or used by another service defined in the /etc/services file. To set the communications port, update the DB2 database manager configuration variable SVCENAME. For example, to set the communications port to 50055, issue the following command as the instance user ("db2inst1", if you've been using the defaults):

    db2 update dbm cfg using svcename 50055

  2. Set the DB2 communications protocol registry variable to define the protocol supported by the server. Typically the only protocol you would use is TCP/IP, so issue the following command as the instance user ("db2inst1" if you've been using the defaults):

    db2set DB2COMM=tcpip

  3. Restart the database instance to enable the settings to take effect.

    
db2stop
    db2start
    

You should now be able to catalog and connect to your Ubuntu server from a remote client.

14.3.2. Running the DB2 Control Center and other DB2 GUI tools

To run the DB2 Control Center or other DB2 GUI tools, you must install the IBM Software Developers' Kit for Java. This RPM is included in the DB2 install CD-ROM in the /db2/linux/Java-1.4/ directory. To install the IBM Software Developers' Kit for Java, change to the root directory of the CD-ROM and issue the following command:


sudo alien -dic db2/linux/Java-1.4/IBMJava2-SDK-1.4.1-2.0.i386.rpm

Log in as the db2inst1 user and invoke the DB2 Control Center:

db2cc


The Linux Tutorial completely respects the rights of authors and artists to decide for themselves if and how their works can be used, independent of any existing licenses. This means if you are the author of any document presented on this site and do no wish it to be displayed as it is on this site or do not wish it to be displayed at all, please contact us and we will do our very best to accommodate you. If we are unable to accommodate you, we will, at your request, remove your document as quickly as possible.

If you are the author of any document presented on this site and would like a share of the advertising revenue, please contact us using the standard Feedback Form.


  




Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial can use your help.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.14 Seconds