Preparation of system bottom layer
Install jdk
tar xvf jdk-7u79-linux-x64.tar.gz vi /etc/profile #Set JDK environment variable: add JDK environment variable setting at the end of vi /etc/profile: JAVA_HOME=/usr/local/java JRE_HOME=/usr/local/java/jre CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin export JAVA_HOME JRE_HOME PATH CLASSPATH source /etc/profile#Profile of effective modification
Configure local yum source
Ignore this step if you are using a network source
mount /dev/cdrom /media/ #Mounted mirroring rpm --import /etc/pki/rpm-gpg/RPM* #Introducing K value #Configure yum source vi /etc/yum.repos.d/rhel-media.repo [base] name=Server Local Sources baseurl=file:///media enable=1 gpcheck=0
Install dependency package
yum install -y librdmacm ibsim ibutils libcxgb3 libibmad libibumad libipathverbs libmthca libnes libibcm numactl
Create users and groups
groupadd -g 996 db2iadm1 groupadd -g 995 db2fadm1 groupadd -g 994 dasadm1 useradd -u 600 -g db2iadm1 -m -d /home/db2inst1 db2inst1 useradd -u 601 -g db2fadm1 -m -d /home/db2fenc1 db2fenc1 useradd -u 602 -g dasadm1 -m -d /home/dasusr1 dasusr1
Install DB2 package
tar xvfz DB2_Svr_10.5.0.1_Linux_x86-64.tar.gz
Select the installed function and select SERVER
Do you want to install the DB2 push call feature? [yes / no] select no in this place
installation is complete
Create DB2 instance
cd /opt/ibm/db2/V10.5/instance/ ./db2icrt -u db2fenc1 db2inst1
Check whether the instance is created successfully
Verifying the DB2 database installation
Log in to the system with the db2inst1 user ID:
su –u db2inst1 #Start database DB2: db2inst@linux:~> db2start #Stop DB2 db2inst@linux:~> db2stop
DB2 parameter configuration
Log in to the system with the db2inst1 user ID:
su –u db2inst1 //Execute the following command to set DB2 related parameters db2set DB2_EXTENDED_OPTIMIZATION=ON #Enable extended optimization db2set DB2_DISABLE_FLUSH_LOG=ON #Turn on disable refresh log db2set AUTOSTART=YES #Turn on auto start db2set DB2_STRIPED_CONTAINERS=ON #Open container db2set DB2_HASH_JOIN=YES #Enable hash connection db2set DB2COMM=tcpip #Using TCP/IP db2set DB2_PARALLEL_IO=* #All start parallel IO db2set DB2CODEPAGE=1208 #Binary code uses that value
Configure the SVCENAME parameter in DB CFG
db2 update dbm cfg using SVCENAME DB2_db2inst1 #Set port