SoFunction
Updated on 2025-04-14

DB2 Personal Edition (Linux) Installation

The db2 tutorial I am watching is: DB2 personal version (Linux) installation. DB2 Personal Edition (Linux) Installation

cowboy(zizhao_chen@) 
the fe of swust 
2003-10-23 

Keywords:
db2 linux installation

Summary:
This article briefly introduces the installation process of db2 pe on the Linux system.

Table of contents:
Introduction to DB2 PE
Or install files
Prepare for installation environment
Complete the installation
test
in conclusion
resource

Introduction to DB2 PE

DB2 Personal Edition (DB2 PE) is a single-user RDBMS running on low-priced commercial hardware desktops. DB2 PE can be used for Windows 98, Windows ME, Windows NT (SP6 or later), Windows 2000 (recommended SP2), Windows XP and Linux. DB2 PE will support them when Microsoft releases Window 2003 servers. DB2 PE has all the functional components of DB2 Workgroup Server Edition, but there is one exception: the remote client cannot connect to the database running the DB2 version. (However, workstations with Control Center can connect to these databases to perform remote management.) Because "this DB2 is DB2" applications developed for DB2 PE will be able to run on any other version of DB2. You can use DB2 PE to develop DB2 applications and then use them for production environments.
DB2 PE is useful in both cases whether the PC is connected to the network or not; it is useful in both cases for users who need strong data storage, or for users who need to provide database storage tools and can connect to remote DB2 servers. DB2 PE also comes with a DB2 Warehouse Center, so users can experiment with business intelligence modeling functions such as abstraction, transformation and loading (see What is a data warehouse?). DB2 PE is scalable and can support all DB2 Extenders: XML (now bundled to DB2 installation), Spatial and Net Search. (For more information, see DB2 Extender.)
Users who occasionally connect may want to use DB2’s built-in replication features and DB2 Control Server (DB2 Control Server) to establish a synchronous environment through which employees outside can maintain contact with the company. Of course, this is only suitable for users using laptops and certain workstations, such as those running point-of-sale (POS) applications.


Prepare for installation
Here, we are installing db2 pe(personal edition), and the installation file can be obtained from the ibm site. The download address is:. The download gets a file in tar format.
In my example, my installation file has been downloaded and placed on a ftp in lan. My installation environment is a newly installed redhat 7.2, which uses the default component of the server installation method.
Copy the installation file to the local area:
[root@no18 root]# wget ftp://192.168.0.1/software/DB/DB2_V81_PE_LNX_32_NLV.tar 
Unzip:
[root@no18 root]# tar xvf DB2_V81_PE_LNX_32_NLV.tar 
All files after unwrap are placed in the pe folder in the current directory.
Start the installation:
[root@no18 root]# pe/db2_install 
After a while, the installation will be completed. By this time, the main work of our installation will be completed.


Complete the installation
What we need to do now is to initialize the database. Including installing the authorization file and creating an instance and running it.
First, we install the authorization file.
If the authorization file is not installed, it is the evaluation version and will expire in 90 days. The authorization file is already available in the installation package. We install it with the following command:
[root@no18 root]# /opt/IBM/db2/V8.1/adm/db2licm -a /root/pe/db2/license/ 
Next, we need to create a user.
[root@no18 root]# useradd db2ins1 
[root@no18 root]# passwd db2ins1 
Start creating an instance:
[root@no18 root]#/opt/IBM/db2/V8.1/instance/db2icrt -u db2ins1 db2ins1 
In this way, we create an instance db2ins1.
Start this instance:
[root@no18 root]# su db2ins1 
[db2ins1@no18 db2ins1]$ db2start 
SQL1063N DB2START processing was successful. 

test

As a test, we run a simple sql: create the database sql.
[root@no18 root]# su db2ins1 
[root@no18 root]# cd 
[db2ins1@no18 db2ins1]$ db2 create database mydb 
DB20000I The CREATE DATABASE command completed successfully. 
that's ok, our database was created successfully.

in conclusion

db2 has won many users for its ease of use, powerful functions and strong support. In this article, we have taken the first step to learning to use db2. Hope it will be helpful to those interested in db2.