The db2 tutorial is: Install the DB2 database. This is installed on AIX in the IBM RS6000 operating system, and the HP9000 is the same
1. Register as a user with Super User Permissions (root)
2. Insert the software CD labeled "DB2 General Database Enterprise Edition" into the drive
3. Enter the following command to create a directory to install the CD-ROM:
# Mkdir-p/cdrom where cdrom represents the CD-ROM installation directory.
Enter the following command to assign the CD-ROM File System:
# Smitty storage
4. Select a File System
5. Select Add/change/display/delete file system
6. Select the CDROM File System
7. Select Add CDROM File System
8. In the pop-up window, enter the following items as the installation point:
/Cdrom
9. Install the CD-ROM file system by entering the following command: smit mountf
10. Enter a value in the file system name field. For example, the name may be/dev/cd0.
11. Enter a value in the installation directory Field. For example, this value may be/cdrom.
12. Set the read-only system to Yes.
13. Click OK.
14. cd/cdrom
15. Enter the./db2setup command to start the DB2 installation program. The Install DB2 V6 window opens.
16. Press the Tab key to change the highlighted options. Press Enter to select or cancel the selected options.
(1) install the following three products on the server:
Note: To display the components of the DB2 product to be installed, select Custom. To return to the previous window at any time, select cancel.
DB2 Administration Client
Choose to customize and install this product,
DB2 UDB enterprise edition
Choose to customize and install this product,
DB2 Software Developer Kit
If you do development at the same time, you need to customize and install this product.
(2) In "DB2 product information" and "DB2 Product Database", only the Chinese language ZH_CN is supported.
17. After you confirm in Step 16, you will start to install the database program. During installation, you also need to confirm the following issues:
(1) whether to create a DB2 management account. Generally, choose to create:
Create db2 Management User db2as by default (use the default UID, Group Id, and install home path). In terms of language support,
Select only the Chinese language ZH_CN.
(2) whether to create a DB2 instance, generally choose to create:
Create db2 Management User db2inst1: db2iadm1 by default (use the default UID, Group Id, and install home path ),
In terms of language support, only the Chinese language ZH_CN is supported.
Create db2 user db2fenc1: db2fenc1 by default (use the default UID, Group Id, and install home path ),
In terms of language support, only the Chinese language ZH_CN is supported.
Prepare whether to create a sample database. (to check whether the database is correctly installed, create a sample database)
Whether to select the DB2 instance process to automatically perform initialization when the operating system starts.
If you want to install and use it on an independent server, you can select autostart, but do not select autostart in the dual-host shared environment of aix + hacmp + db2.
Autostart: the startup of the DB2 instance process, which is controlled by hacmp.
18. Installation result:
After the database program is installed, the DB2 software program is installed in the/usr/lpp directory,
DB2DIR =/usr/lpp/DB2_06_01
Note: If the instance creation and management account are not specified during the installation process, you can use the command to create the instance (db2icrt) after the installation is complete ).
To create or add a new instance, "Management Server", or other DB2 Products and Components, run the following command:
/Usr/lpp/DB2_06_01/install/DB2setup
19. Verify Installation
If you do not select to create a sample database during installation, you can use the command (db2sampl) to create a SAMPLE database after installation,
Verify the installation by using the command line processor to connect to the database:
(1) register with the system as a user with SYSADM permissions. For example, db2inst1
(2) enter the DB2sampl command to create the SAMPLE database.
(3) when creating a SAMPLE database, use the database alias SAMPLE to automatically catalog it.
(4) enter the DB2start command to start the database management program.
(5) enter the following command to connect to the SAMPLE database, retrieve the list of all employees working in department 20, and reset the database connection:
DB2 connect to sample
DB2 "select * from staff where dept = 20"
DB2 connect reset
Note: after verification and installation, you can remove the SAMPLE database to release disk space. Enter the DB2 drop database sample command
To unload the SAMPLE database.
If you have not installed the DB2 tool, you can create a SAMPLE database and use the command line processor
To verify the installation, as shown below:
Step 1.
Register with the system as a user with SYSADM permissions.
Step 2.
Enter the db2sampl command to create the SAMPLE database.
When you create a SAMPLE database, use the database alias SAMPLE to automatically catalog it.
Step 3.
Enter the db2start command to start the database management program.
Step 4.
Run the following command to connect to the SAMPLE database ,&
[1] [2] Next page
The db2 tutorial is: Install the DB2 database. Retrieve the list of all employees working in department 20 and reset the database connection:
Db2 connect to sample
Db2 "select * from staff where dept = 20"
Db2 connect reset
If the preceding commands are correctly executed, the installation of the DB2 UDB database server is successful.
Previous Page [1] [2]