The following articles mainly describe how to correctly install the DB2 database in linux. I saw the correct installation steps for the DB2 database on the relevant website two days ago, I will share it with you. The following is a detailed description of the article. I hope you can learn from it.
 
Linuxlinux
 
 
After installing db2 today, I have been busy for a while. I have finally installed it online, so I will share my steps with you.
 
 
Step 1: Check the package and its version
 
      
        
        
          
        
         
 
  
  - compat-libstdc++-7.3-2.96.118.i386.rpm 
 
 
 
        
       
       
Find the linux installation disk and use rpm-I compat-libstdc ++-7.3-2.96.118.i386.rpm to install the DB2 database.
 
 
Step 2: Configure Linux Kernel Parameters
 
 
/Etc/sysctl. conf file to add Kernel Parameters
 
 
      
        
        
          
        
         
 
  
  - kernel.msgmni =1024 
 
  
  - kernel.sem = 250 256000 32 1024 
 
 
 
        
       
       
Activate the change: sysctl-p
 
 
Step 3: Install the DB2 database
 
 
Sh db2_install
 
 
Follow the prompts
 
 
Step 4: create a user
 
 
      
        
        
          
        
         
 
  
  - /usr/sbin/groupadd db2iadm1  
 
  
  - /usr/sbin/groupadd db2fadm1  
 
  
  - /usr/sbin/useradd –m -g db2iadm1 –d /home/db2inst1 db2inst1  
 
  
  - /usr/sbin/useradd –m -g db2fadm1 –d /home/db2fenc1 db2fenc1 
 
 
 
        
       
       
Step 5: Create an instance
 
 
      
        
        
          
        
         
 
  
  - /opt/IBM/db2/V8.1/instance/db2icrt –a server –u db2fenc1 db2inst1 
 
 
 
        
       
       
Step 6: Product License
 
 
      
        
        
          
        
         
 
  
  - /opt/IBM/db2/V8.1/adm/db2licm -a /mnt/cdrom/db2/license/db2pe.lic 
 
 
 
        
       
       
Step 7: Allow multi-page distribution of SMS
 
 
      
        
        
          
        
         
 
  
  - /opt/IBM/db2/V8.1/cfg/db2ln 
 
 
 
        
       
       
Step 8: add the DB2 Port
 
 
      
       
Add vi/etc/services to the following line
 
 
      
       
Step 9: DB2 Configuration
 
 
      
        
        
          
        
         
 
  
  - su – db2inst1  
 
  
  - db2set DB2_EXTENDED_OPTIMIZATION=ON  
 
  
  - db2set DB2_DISABLE_FLUSH_LOG=ON 
 
  
  - db2set AUTOSTART=YES 
 
  
  - db2set DB2_STRIPED_CONTAINERS=ON  
 
  
  - db2set DB2_HASH_JOIN=Y 
 
  
  - db2set DB2COMM=tcpip 
 
  
  - db2set DB2_PARALLEL_IO=*  
 
  
  - db2set DB2CODEPAGE=819 
 
  
  - #Update dbm cfg  
 
  
  - db2 update dbm cfg using SVCENAME db2inst1  
 
  
  - db2 update dbm cfg using INDEXREC ACCESS  
 
  
  -  
 
 
 
        
       
       
Step 10: Run DB2
 
      
       
Step 2: Create a database
 
 
      
        
        
          
        
         
 
  
  - db2 "CREATE DATABASE test1 ALIAS test1 USING CODESET ISO8859-1 TERRITORY CN" 
 
 
 
        
       
       
You can create tables and perform table operations later. For example, db2 "select * from tbl" describes how to correctly install the DB2 database in linux, I hope you will have some gains.