DB2 Database:: Installation
DB2 Database:: Installation
and the sample database. The product "Connect Enterprise" will not be
installed for this exapmle. (It enables connectivity with mainframe services)
Installation:
1. Check configuration:
o Default language: echo $LANG
For me this returned: en_US
o Check if reguired packages are installed: rpm -e pdksh compat-libs
ncurses4
The package pdksh ensures shell compatability with
commercial ATT based Unix sytems.
The package compat-libs is for Red Hat 7.x+ systems to
have Red Hat 6.x compatability.
Package ncurses4 provides terminal drivers and cursor
control mechanism.
2. Mount the CD (Disk 1 of 2): mount -t iso9660 -o ro /dev/cdrom
/mnt/cdrom
[Potential Pitfall]: At first I was lazy and issued the command: mount
/mnt/cdrom which picks up system defaults and works for viewing CD
contents. The problem was that this mounts the CD with privileges
which allow for read only and does NOT allow one to execute scripts on
the CD. Use the above (complete) command which will allow for the
execution of scripts on the CD.
3. Install DB2: (as root)
o cd /mnt/cdrom/db72pf5u/
o ./db2setup
o
Use the down arrow or tab key to migrate the menu. First select
the "Install..." option to select the products to install. Next select
the "Create..." option to create a DB2 Instance.
o After selecting the "Install..." option you will be presented with the
following panel:
o
Use the arrow (or tab) key to highlight a product selection. Use
the space bar to toggle selection between [ ] and [*]. After the
product has been selected, choose "Customize..." to add features.
DB2 Administration Client
:*: Java Support
:*: Control Center
DB2 UDB Enterprise Edition
:*: Java Support
:*: Replication
:*: Local Warehouse Control Database
:*: Distributed Join for DB2 Data Sources
:*: Getting Started
DB2 Application Development Client
:*: Java Support
:*: Control Center
:*: DB2 Sample Applications
:*: Create Links for DB2 Libraries
DB2 Product Library (by default no language is selected. Select
one!)
Optional: DB2 Product Library (HTML):
:*: en_US [ ] fr_FR [ ] de_DE
Approve it by selecting OK.
Environment
Value
Variable
DB2DIR /usr/IBMdb2/V7.1
DB2INSTANCE db2inst1
ISNTHOME
LD_LIBRARY_P :/home/db2inst1/sqllib/lib
ATH
LIBPATH :/home/db2inst1/sqllib/lib
/
home/db2inst1/sqllib/java/sqlj.zip:/home/db2inst1/sqllib/functi
CLASSPATH on:
/home/db2inst1/sqllib/java12/db2java.zip:/home/db2inst1/sqllib/
java/runtime.zip:.
$PATH:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:
PATH /home/db2inst1/sqllib/misc:/home/db2inst1/bin
Test the database:
Log in as user db2inst1
(i.e.: su - db2inst1)
Issue the command: db2
This will put you into the db2 environment and at the db2 command
prompt.
db2 => connect to sample
db2 => select * from employee
db2 => quit
Start DB2: db2start
By default the installation will start the database and configure the
system to start DB2 each time the system boots.
List database instances: db2ilist
List database release levels: db2level
Stop DB2: db2stop
As user db2inst1:
Notes:
In order to use DB2 GUI management tools one must install the IBM
Java run time environment. Login as DB2 administrative
usersdb2as or db2inst1 and run the command db2cc (DB2 Control
Center). It is important to add a JAVA_HOME statement to the environment
file: /home/db2as/.bashrc or for user db2inst1. Help and documentation is
also available from this panel or by initiating the
commanddb2ic (Information Center).
Installation:
cd /tmp
mkdir ws
cd ws
cp /mnt/cdrom/wasi401u/wasi401u.zip .
unzip wasi401u.zip
cd linux
./install.sh
Note:
o This installation will install the HTTPD web server and the
WebSphere applications server. IBM uses it's own installation of
Apache and installs the appropriate modules. (I installed all
modules available.)
o The "IBM HTTP Server httpd.conf" configuration file requested
during installation is /opt/IBMHTTPServer/conf/httpd.conf
The Apache httpd.conf: /etc/httpd/conf/httpd.conf
(This original default apache installation was not used in this
tutorial.)
This will add the statements:
...
Alias /WSsamples /opt/WebSphere/AppServer/WSsamples
...
LoadModule app_server_http_module
/opt/WebSphere/AppServer/bin/mod_app_server_http.so
WebSpherePluginConfig /opt/WebSphere/AppServer/config/plugin-
cfg.xml
AddModule mod_app_server_http.c
Notes:
Post install: