DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone >

DB2 Manual Installation On Linux

Weei Jye Chay user avatar by
Weei Jye Chay
·
Mar. 16, 07 · · Code Snippet
Like (0)
Save
Tweet
1.11K Views

Join the DZone community and get the full member experience.

Join For Free
Install

    * Login as root.
    * Create groups:
          o groupadd -g 999 db2iadm1
          o groupadd -g 998 db2fadm1
          o groupadd -g 997 dasadm1 

    * Create users for each group:
          o useradd -u 1004 -g db2iadm1 -m -d /home/db2inst1 db2inst1
          o useradd -u 1003 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1
          o useradd -u 1002 -g dasadm1 -m -d /home/dasusr1 dasusr1 

    * Set password for each users created:
          o passwd db2inst1
          o passwd db2fenc1
          o passwd dasusr1 

    * cd to installation file directory:
          o Example: /tmp/db2/exp/disk1 

    * Run installation script:
          o ./db2_install.sh 

Post Install

    * Login as root.
    * Install license (example):
          o /opt/ibm/db2/V9.1/adm/db2licm –a /tmp/db2/exp/disk1/db2/license/db2exp_uw.lic 

Create the DB2 Administration Server (DAS)

    * Login as root.
    * Create DAS with dasusr1
          o /opt/ibm/db2/V9.1/instance/dascrt -u dasusr1 

    * Login as dasuser1
          o Start the DAS: db2admin start 

    * Optional: to enable autostarting of the DAS upon reboot
          o /opt/ibm/db2/V9.1/instance/dascrt/dasauto –on 

Create DB2 instance

    * Login as root.
    * Create instance with users db2fenc1 and db2inst1:
          o /opt/ibm/db2/V9.1/instance/db2icrt -a server -u db2fenc1 db2inst1 
    * Optional: enable autostarting of the db2inst1 instance
          o /opt/ibm/db2/V9.1/instance/db2iauto –on db2inst1 

Update environment variables

    * Example:
    * Login as db2inst1
    * edit .bash_profile
          o vi /home/db2inst1/.bash_profile
          o insert the following line at the end of the file – “. /home/db2inst1/sqllib/db2profile” 

    * Do the same for dasusr1, using its corresponding directory. 

Database service

    * Login as root:
    * Add new service entry:
          o vi etc/services
          o insert this line “DB2_TMINST 50000/tcp” at the end of the file 

Verification

    * Login as db2inst1
    * List installed DB2 products and features: db2ls
    * Display the default instance: db2 get instance
          o Result: The current database manager instance is: db2inst1 
    * Start the database instance: db2start
          o Result: SQL1063N DB2START processing was successful. 
    * Stop the database instance: db2stop
          o Result: SQL1064N DB2STOP processing was successful. 
Linux (operating system)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Configure Git in Eclipse IDE
  • A Guide to Understanding Vue Lifecycle Hooks
  • How to Use Geofences for Precise Audience Messaging
  • The Most Popular Technologies for Java Microservices Right Now

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo