The purpose of this section is to walk you through a typical install of DB2 Version 7.1 on Linux. The following section, Section 6, tells you how to create both a DB2 Administration Server and a DB2 instance. For in-depth information on the components offered by DB2 Version 7.1, consult the following documents:
For the purposes of this document, I'll assume that you have a copy of DB2 Version 7.1 on CD-ROM. If you download a copy from IBM, just adjust the path /mnt/cdrom in the following instructions to reflect the directory created by the tar command.
Some distributions disable execute privileges on CD-ROM devices by default. To mount a CD-ROM with execute permissions at mount point /mnt/cdrom, issue the following command as root:
|
You'll find the following executables on the root directory of the DB2 Version 7.1 installation CD-ROM:
db2setup: Use the db2setup command to install DB2 Version 7.1, to create or modify DB2 instances, and to create a DB2 Administration Server. Once you install DB2, db2setup is copied to the /usr/IBMdb2/V7.1/install directory to enable you to create or modify instances without the CD-ROM.
db2_install: The db2_install command provides an alternate means of installing DB2 RPMs. Unlike db2setup, it does not enable you to create a DB2 instance or Administration Server, or install a license key. I highly recommend db2setup.
db2_deinstall: Use the db2_deinstall command to uninstall the DB2 Version 7.1 packages on your system. For more information, see Section 7.
The db2setup command provides a terminal-based text menu for your installation and instance creation options. Unfortunately, db2setup on Linux sometimes encounters a few formatting bugs in terminal emulators. Running db2setup from the TTY console works well. Within an X session, the rxvt or xterm terminals work quite well, but gnome-terminal is rather frustrating to use. If the text menu formats incorrectly, press CTRL-L to refresh the menu. |
The following instructions assume that you are using db2setup to install DB2.
To select or deselect a component, highlight the component using the cursor keys and press ENTER.
To change the options for a component, highlight [ Customize... ] and press ENTER.
To install your selected components, highlight [ OK ] on the Install DB2 V7 menu and press ENTER.
The common DB2 files are installed in the /usr/IBMdb2/V7.1/ directory. When you create an instance, a directory called sqllib is created in the corresponding user's home directory. The sqllib directory contains symbolic links to the executables and other files in /usr/IBMdb2/V7.1/.
The following list describes some of the common DB2 components that you can install, including estimates of the size required for each component.
Description of DB2 components
The Administration Client enables database administrators to administer local or remote DB2 servers from the command line. This component, without Java support or the Control Center, requires about 20 MB of disk space.
The Control Center (db2cc) is an optional part of many DB2 components. It gives database administrators a graphical interface for administering local or remote DB2 servers. The Control Center includes the DB2 Information Center (db2ic), which gives you a graphical interface that provides a tree view of the DB2 documentation installed on your workstation organized by task or by title.
Note that both the Control Center and Information Center are Java applications, so their performance depends on your system's processor speed and available memory. This component requires about 90 MB of disk space.
You probably want to install the Control Center. |
These components determine the state of your DB2 installation as a database server. The core capabilities of the components are the same. The difference between Enterprise Edition and Workgroup Edition primarily has to do with how they are licensed--Enterprise Edition is licensed on a per-processor basis with unlimited users, while Workgroup Edition is licensed on a per-user basis. Enterprise Edition also gives you the capability to enable DB2 clients to connect to mainframe databases, like DB2 for OS/390 or DB2 for OS/400. In contrast, Personal Edition is a single user database server that is useful only for developing DB2 applications. You cannot use Personal Edition as a server because Personal Edition does not accept incoming remote connections.
Adding one of these components requires about 40 MB of disk space.
Options for DB2 servers
This option enables your DB2 server to replicate data to other DB2 servers, and, with additional software, across non-DB2 servers as well. This option requires about 5 MB of disk space.
This option enables your DB2 server to participate in a join with data from other database servers. This option requires about 2 MB of disk space.
The Application Development Client component installs the headers and libraries that you need to create applications using embedded SQL for C and C++, Call Level Interface (CLI), Java Database Connectivity (JDBC), or embedded SQL for Java (SQLJ). You also have the option of installing the source code for sample applications that demonstrate much of the functionality of DB2.
If you plan on developing applications for DB2, install the sample applications. The sample directories in /usr/IBMdb2/V7.1/samples/ contain build scripts (bld***) that include the compile and link options suitable for your own applications. |
If you are trying to develop applications and you get an error like "That command is not supported in this environment" while trying to precompile a file, it's because you either did not install the Application Development Client, or you installed it after you created an instance and you have not used the db2iupdt command to update the instance. See Section 9.1 for more information on db2iupdt. |
Including the sample applications, this component requires about 10 MB of disk space.
Documentation is installed into the /usr/IBMdb2/V7.1/doc/ directory. For each language that you install, the DB2 installer creates a subdirectory with a five-character name corresponding to the language locale. Issue the db2help command to fire up your Web browser with a page that links to the documentation installed with DB2.
The English HTML (En_US) documentation requires about 90 MB of disk space.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |