Installation of Db2 – exact commands used

advertisement
Installation of Db2 – exact commands used
1. Log in as a user ID with root authority.
2. If you are not using a CD to install DB2, you can skip to step 5 and work from the
directory where you have the DB2 source installation program. If you are
installing DB2 using the CD, create a mount point or choose an existing mount
point. To create a mount point called /cdrom, entering the following command:
mkdir /cdrom
3. Insert the DB2 CD into the CD-ROM drive. Mount the CD-ROM file system at
the desired mount point.
On AIX, you can use the crfs command to add an entry to
/etc/filesystems for the cdrom mount point. Run the following
commands:
/usr/sbin/crfs -v cdrfs -p ro -d'cd0' -m'/cdrom' -A'no'
mount /cdrom
The crfs command only has to be run once for a given mount point, and after that
you can use mount and umount for each CD or DVD you put in the drive, for
example, mount /cdrom and umount /cdrom.
4. Change to the directory where the CD-ROM is mounted by entering the following
command:
cd /cdrom
5. Install the DB2 Manager.
a. Create a temporary directory (for example, db2temp) to hold the DB2
installer tar file and untarred files. These files require 2-3 gigabytes of
hard drive space.
b. Copy or download the DB2 installer into db2temp. The name of the file
varies depending on the location from where the file is downloaded or
copied and the language to which it is associated.
c. (optional) Use the appropriate unzipping tool to unzip the DB2 installer
file if it is compressed. For example, ,if the name of the file is
v9fp2_aix_ese.tar.gz, type gunzip v9fp2_aix_ese.tar.gz. In this example,
v9fp2_aix_ese.tar appears in the db2temp directory.
d. Make an installer directory. For example, type mkdir install.
e. Change to the new install directory. Type cd install.
f. Un-tar the DB2 installer file. For example, of the name of the installer file
is v9fp2_aix_ese.tar, type tar xvf ../v9fp2_aix_ese.tar.
g. Go to the directory that contains the DB2 installer executable. Type cd
/db2temp/installer/ese/disk1.
h. Execute the command line installer. Type ./db2_install.
i. Select the product to install: DB2.ESE. A number of messages appear in
the command window. The Installation Summary eventually
appears and indicates a successful installation. DB2 is installed in
/opt/IBM/db2.
6. Create users and groups for use with DB2.
a. Type mkgroup id=999 db2iadm1.
b. Type mkgroup id=998 db2fadm1.
c. Type mkgroup id=997 dasadm1.
d. Type mkuser id=1004 pgrp=db2iadm1 groups=db2iadm1
home=/home/db2inst1 db2inst1.
e. Type mkuser id=1003 pgrp=db2fadm1 groups=db2fadm1
home=/home/db2fenc1 db2fenc1.
f. Type mkuser id=1002 pgrp=dasadm1 groups=dasadm1
home=/home/dasusr1 dasusr1.
g. Verify the owner of the directories. To do this, type ls -ld
/home/db2inst1. The directory ownership should appear as follows:
 /home/db2inst1 should show group db2iadm1 and user db2inst1
 /home/db2fenc1 should show group db2fadm1 and user db2fenc1
 /home/dasusr1 should show group dasadm1 and user dasusr1
If the directory ownership is not correct, run the following commands as
appropriate:



chown -R db2inst1:db2iadm1 /home/db2inst1
chown -R db2fenc1:db2fadm1 /home/db2fenc1
chown -R dasusr1:dasadm1 /home/dasusr1
h. Type passwd db2inst1 password, where password represents the
password you want to use for the DB2 instance.
i. Type pwdadm -f NOCHECK db2inst1.
j. Type passwd db2fenc1password, where password represents the
password you want to use for the fenced user.
k. Type pwdadm -f NOCHECK db2fenc1.
l. Type passwd dasusr1password, where password represents the password
you want to use for the DB2 administration server (DAS) user.
m. Type pwdadm -f NOCHECK dasusr1.
n. Type chgroup users=db2inst1,root db2iadm1.
7. Create a DB2 Administrative Server (DAS). Type /opt/db2/V9.5/instance/dascrt
-u dasusr1.
8. Create a DB2 instance:
a. Type /opt/db2/V9.5/instance/db2icrt -a server -u db2fenc1 db2inst1.
b. Type . /home/db2inst1/sqllib/db2profile.
9. Change the default location for database repositories. By default, this location is
/home/db2inst1. /home is usually not large enough for database
repositories. Choose a file system with enough free space (30 gigabytes or higher)
to contain the IBM® Tivoli® Storage Productivity Center repository. To change
the default location, complete the following steps:
a. Type db2 update dbm cfg using DFTDBPATH <new repository path>
IMMEDIATE, where <new repository path> represents the new location
for the repository.
b. Type chown -R db2inst1:db2iadm1 <new repository path> to assign
ownership to db2inst1 and permission to anyone in db2iadm1 (same as the
ownership for /home/db2inst1).
10. Configure DB2 communication:
a. Edit /etc/services and verify or add the following line at the end of
the file: db2c_db2inst1 50000/tcp
b. Type db2 update dbm cfg using svcename db2c_db2inst1.
c. Type db2set DB2COMM=tcpip.
11. Add the DB2 license:
a. Type cd /opt/IBM/db2/V9.5/adm.
b. Type ./db2licm -a <DB2 installer
location>/db2/ese/disk1/db2/license/db2ese_o.lic, where <DB2 installer
location> represents the directory where the DB2 installer is located (for
example, /db2temp/install).
12. Restart DB2:
a. Type db2stop force.
b. Type db2 terminate.
c. Type db2start.
13. Test your DB2 instance:
a. Type . /home/db2inst1/sqllib/db2profile.
b. Type db2level . Information about the instance and DB2 is displayed.
c. Type db2 create db test to create a test database.
d. Type db2 list db directory to list information about all the databases
created for this instance.
e. Type db2 connect to test user db2inst1 using <password>, where
password represents the password you defined in step 6 for the DB2
instance.
f. Type db2 disconnect test.
g. Type db2 drop db test.
Installing DALD
Su –c “./domino/FJDB2ENV/Db2Access/setup.bin –console”
Data path/folder
/domino/ibm/db2/sqllib
DB2Access Server ID
/Domino/ibm/Domino85/data/Db2Acces.id
Remaining steps to Install Domino and Enabling it on the Administration client were
exactly the same as
http://www-01.ibm.com/support/docview.wss?rs=1041&uid=swg27010956
Download