Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 1195

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Installing DB2 Express-C on Ubuntu 6.06 LTS 'Dapper Drake'</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="IBM DB2 Express-C for Linux HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Installing DB2 Express-C on Mandriva Linux 2007"
HREF="mand2007.html"><LINK
REL="NEXT"
TITLE="Installing DB2 Express-C on Ubuntu 7.04 'Feisty Fawn'"
HREF="ubuntu704.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>IBM DB2 Express-C for Linux HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="mand2007.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="ubuntu704.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="ubuntu606"
></A
>15. Installing DB2 Express-C on Ubuntu 6.06 LTS 'Dapper Drake'</H1
><P
>&#13;  Before proceeding, please ensure that you have read <A
HREF="planning.html"
>Section 5</A
>
  and <A
HREF="installing.html"
>Section 6</A
>.
  </P
><P
>These installation notes are based on a single-partition installation
  using the 2.6.15-17 kernel.</P
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN705"
></A
>15.1. Installation notes</H2
><P
>Since you cannot log in as root directly with an Ubuntu system, this
    DB2 installation is run as the default user created during Ubuntu
    setup (i.e. the regular user account with 'sudo' capability).</P
><P
>There are two ways of installing DB2 Express-C 9 on Ubuntu. The harder
    of the two methods is to use the default DB2 <B
CLASS="command"
>db2setup</B
>,
    and then make adjustments to the Ubuntu system afterwards to handle the
    slight differences of Ubuntu's Debian-based packaging system. For
    reasons of clarity and brevity, I will omit the instructions for doing it
    this more difficult way; however, if you would like to see these
    instructions, please send me an email (db2howto@gmail.com) and I will
    pass them along.</P
><P
>The easy way to install DB2 Express-C on Ubuntu 6.06 LTS is to 
    use the Synaptic package installer, and almost everything is done for you,
    from downloading to installation and configuration. Here's how to do it:
    <P
></P
><OL
TYPE="1"
><LI
><P
>Under the <B
CLASS="command"
>Applications</B
> menu on the Ubuntu
      menu bar, choose <B
CLASS="command"
>Add/Remove</B
>.
        </P
></LI
><LI
><P
>Once the Synaptic package manager application has started up,
      click the <B
CLASS="command"
>Show commercial applications</B
> checkbox.</P
></LI
><LI
><P
>In the <B
CLASS="command"
>Search</B
> bar, type "DB2" and hit the Enter
        key.</P
></LI
><LI
><P
>DB2 Express should show up as the only result. If you don't see
        it, make sure that Synaptic is displaying <B
CLASS="command"
>All
        Applications</B
> or <B
CLASS="command"
>Third party applications</B
>.
        </P
></LI
><LI
><P
>Enable the <B
CLASS="command"
>dapper-commercial</B
> channel if
        requested by clicking the "<B
CLASS="command"
>Enable channel</B
>" button.
        </P
></LI
><LI
><P
>Click "<B
CLASS="command"
>Apply</B
>".
        </P
></LI
></OL
>
    After hitting the "<B
CLASS="command"
>Apply</B
>" button, Synaptic will
    download the DB2 Express-C package, along with a few dependent libraries,
    then unpack and install the package and finally configure the DB2 users and
    default instance.
    </P
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="AEN734"
></A
>15.2. Post-installation notes</H2
><P
></P
><P
>After installation by Synaptic, there are a few steps required to get
    DB2 up and running smoothly.
    <P
></P
><OL
TYPE="1"
><LI
><P
>Usable passwords for the DB2 default accounts.</P
><P
>To actually log in or connect to the DB2 databases and servers using
      the default DB2 users (db2inst1, db2fenc1, and dasusr1), you need to
      modify the initial passwords. To do this, open a terminal (as the regular
      user), and type <B
CLASS="command"
>sudo su -</B
> to get root access. Then run
      these three commands:
      <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>passwd db2inst1
passwd db2fenc1
passwd dasusr1</PRE
></FONT
></TD
></TR
></TABLE
>
      Each time you will be asked to set the new password for the specified user
      account.</P
></LI
><LI
><P
>Change the default shell for the DB2 default accounts.</P
><P
>The default command shell for the DB2 accounts is set as just a
      plain old <B
CLASS="command"
>/bin/sh</B
>. To get the handy features of the
      BASH shell, you'll want to change it for these three accounts. In the same
      root access command window, open the <TT
CLASS="filename"
>/etc/passwd</TT
> file
      in your favorite text editor and change:
      <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;db2inst1:x:1001:1001::/home/db2inst1:/bin/sh
db2fenc1:x:1002:1002::/home/db2fenc1:/bin/sh
dasusr1:x:1003:1003::/home/dasusr1:/bin/sh</PRE
></FONT
></TD
></TR
></TABLE
>
      to
      <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>&#13;db2inst1:x:1001:1001::/home/db2inst1:/bin/bash
db2fenc1:x:1002:1002::/home/db2fenc1:/bin/bash
dasusr1:x:1003:1003::/home/dasusr1:/bin/bash</PRE
></FONT
></TD
></TR
></TABLE
>
      </P
></LI
><LI
><P
>Enable DB2 service ports for remote connections.</P
><P
>To enable outside users to get to your DB2 databases, you'll need
        to set up the DB2 service port, as it is not configured by the Synaptic
        installation process.</P
><P
>As the regular user, run <B
CLASS="command"
>sudo vi /etc/services</B
>
        and add this line to the end of the file and save the changes:
      <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>db2c_db2inst1       50001/tcp        # IBM DB2 instance - db2inst1</PRE
></FONT
></TD
></TR
></TABLE
>
      Then, as the DB2 instance owner (db2inst1 by default), run these commands:
      <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>db2 update dbm cfg using SVCENAME db2c_db2inst1
db2set DB2COMM=tcpip
db2stop
db2start</PRE
></FONT
></TD
></TR
></TABLE
>
      Now remote users will be able to connect to the DB2 databases on your
      Ubuntu system.
      </P
></LI
><LI
><P
>Enable remote DB2 administration connections.</P
><P
>To allow remote administration of your DB2 server, you'll need to
        set up the DB2 DAS connection port, as it is not configured by the
        Synaptic installation process.
        </P
><P
>As the regular user, run <B
CLASS="command"
>sudo vi /etc/services</B
>
        and add this line to the end of the file:
      <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>ibm-db2           523/tcp          # IBM DB2 DAS
ibm-db2           523/udp          # IBM DB2 DAS</PRE
></FONT
></TD
></TR
></TABLE
>
        Then, as the DB2 DAS owner (dasusr1 by default), run these commands:
      <TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="screen"
>db2admin stop
db2admin start</PRE
></FONT
></TD
></TR
></TABLE
>
        Now remote administrators can connect to the DAS server to administer
      databases on your Ubuntu system.
        </P
></LI
></OL
>
    </P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="mand2007.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="ubuntu704.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Installing DB2 Express-C on Mandriva Linux 2007</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Installing DB2 Express-C on Ubuntu 7.04 'Feisty Fawn'</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>