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
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
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-icompat-libstdc-7.3-2.96.118.i386.rpm to install it.
Step 2: Configure Linux Kernel Parameters
/Etc/sysctl. conf file, add Kernel Parameters
Kernel. msgmni= 1024
Kernel. sem = 250 256000 32 1024
Activate the change: sysctl-p
Step 3: Install
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-udb2fenc1db2inst1
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
SU-root
Add vi/etc/services to the following line
Db2inst1 50000/tcp
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
Db2start
Step 2: Create a database
Db2 create database test1 ALIAS test1 USING CODESETISO8859-1TERRITORY CN
You can create tables and operate on tables later, for example, db2 select * from tbl