IBM's Universal Database
Installing DB2 is made easy by an installation and setup utility called DB2 Installer. This utility will install all required packages for DB2, create instances for DB2 databases and administration support, and configure your DB2 server for communications. The instructions in this section assume you do not change any of the defaults presented by DB2 Installer, unless noted in the steps below.
You will usually run into display problems if you start DB2 Installer from a command window in your Linux distribution's graphical interface. You can refresh the view of DB2 Installer at any time by pressing CTRL-L. To avoid most potential display problems, I recommend running the DB2 Installer in a virtual console session outside of your operating system's graphical interface. You can shift between the virtual console session and the graphical interface session on most Linux distributions by pressing CTRL-ALT-F1 and CTRL-ALT-F7. Refer to your Linux documentation for more details.
To quickly install DB2, perform the following steps:
Log on to the system as a user with root authority
Mount the DB2 product CD-ROM by entering the following command:
mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom
where /mnt/cdrom is the mount point of the CD-ROM. Note that even if you are installing DB2 on a workstation that is running TurboLinux version 3.6 or Red Hat Linux version 6.1, you still need to mount the CD-ROM. The image created by the install fix links to the DB2 CD-ROM. For more information, refer to your fix's readme.txt file.
Change focus to the mount point of the CD-ROM. Note that if you were installing DB2 on a workstation that is running TurboLinux version 3.6 or Red Hat Linux version 6.1, you would change to the directory where you created the image on your workstation. For more information, refer to your fix's readme.txt file.
Enter the ./db2setup command to start the DB2 Installer program. The Install DB2 V6.1 window will open. The contents of this window vary with respect to the DB2 product you are installing. Figure 1 is the window displayed when you are installing DB2 Workgroup Edition for Linux.
tab key to move the selector bar, and the ENTER key to select or deselect an option. For more information or assistance during the installation of DB2, select Help. From the product list, select the DB2 product you want to install. For this example, select DB2 UDB Workgroup Edition, then OK. The Create DB2 Services window will open.
Select the “Customize” option beside the DB2 product you want to install. For our example, select the “Customize” option beside the DB2 UDB Workgroup Edition option.
Select the “Java Support” and the “Control Center” components.
Select the “Create a DB2 Instance” option. Enter a password for this user and verify it by retyping this password in the field provided.
Select the “Properties” option.
Select the “Create a Sample Database” for a DB2 instance then OK.
Select OK.
A window will open that asks you to create a user that will be used to execute user-defined functions (UDFs) and stored procedures. For this example, you do not need to know anything about, or use, this user. Simply enter a password for this user, verify it and select OK. You are returned to the DB2 Create Services window. For more information on UDFs or stored procedures, refer to the “Administration Guide”.
Select the “Create the Administration Server” option. Enter a password for this user as well and select OK.
A pop-up window will open telling you the DB2 system's name for this workstation. Select OK. You are again returned to the Create DB2 Services window.
Select OK, then Continue, and finally, OK to begin the installation. When the installation completes, respond to the DB2 Installer's prompts to close this utility.
You are finished all the steps necessary to install DB2!
Now that you have finished your installation, let's go through a quick sample query to prove to you that this powerful database is actually alive and running on your system.
To verify your installation, perform the following steps:
Log on to the system as the db2inst1 user. If you use the su command to do this, ensure that you enter this command with the - option; for example, su - db2inst1.
Enter the following command to connect to the sample database created by DB2 Installer:
db2 connect to sample
You should receive output that is similar to the following:
Database Connection Information
Database server = DB2/LINUX 6.1.0
SQL authorization ID = DB2INST1
Local database alias = SAMPLE
Enter the following command to select a list of all employees who belong to department 20 in the staff table:
db2 "select * from staff where dept = 20"
Note that you must enter this command using the quotation marks so that your operating system does not confuse the SQL statement with a command. You should receive output that is similar to that shown in Table 1.
End the database connection by entering the following command: db2 terminate.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Designing Electronics with Linux
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Using Salt Stack and Vagrant for Drupal Development
- Validate an E-Mail Address with PHP, the Right Way
- Build a Skype Server for Your Home Phone System
- A Topic for Discussion - Open Source Feature-Richness?
- Why Python?
- Tech Tip: Really Simple HTTP Server with Python
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




1 hour 27 min ago
5 hours 14 min ago
5 hours 22 min ago
7 hours 37 min ago
10 hours 7 min ago
20 hours 10 min ago
1 day 37 min ago
1 day 4 hours ago
1 day 4 hours ago
1 day 7 hours ago