Docker hit DB2 9.7 mirror mining Pit related

Source: Internet
Author: User
Tags db2 db2 installation ibm db2 custom name docker cp docker run

Overview: Using centos:7.2.1511 mirroring as the base image, use the Docker commit method to build the steps:
    1. Run centos7.2.1511 Mirror (run in privileged mode, modify required parameters for subsequent kernel parameters)
Docker run-it--privileged centos:7.2.1511/bin/bash 2. Copy the DB2 install package into the image in the Docker CP v9.7_linuxx64_server.tar.gz container ID: /usr/local 3. In-mirror operation
    • Unpacking the installation package
TAR-XZVF v9.7_linuxx64_server.tar.gz
    • Enter the unpacked directory server
CD Server
    • Check the installation environment
./db2prereqcheck
    • Environment missing information
* WARNING: * The-the-bit library file libstdc++.so.6 is not found on the system.      * 32-bit applications may affected.    * ERROR: * The required library file libaio.so.1 is not found on the system. * Check The following Web site for the up-to-date system requirements * of IBM DB2 9.7 * http://www.ibm.com/so ftware/data/db2/udb/sysreqs.html * http://www.software.ibm.com/data/db2/linux/validate
    • Workaround
* Yum install-y libstdc++ * Yum install-y libstdc++.so.6 * Yum install-y Libaio
    • Installing DB2
./db2_install do you want to select another directory for installation? [Yes/no]--Enter no default installation opt, select Yes to enter the installation directory to specify one of the following keywords to install the DB2 product-input ESE ESE is initializing the DB2 installation. ......
        • Error point, total 48 steps, install to step 41st or 36th Hangup
Task #41 start description:starting DB2 Fault Monitor Estimated time second (s) hangup
      • PS: If there are 47 steps around a small error can be ignored, does not affect
      • Workaround (Modify kernel parameters):
        • Run the container with--privileged, then modify the kernel parameters Docker run-t-i--net=host-v/db2disk:/db2disk--privileged Centos_db2ese_v1.1/bin/bashvi/ Etc/sysctl.confkernel.shmmni = 65536kernel.shmmax = 274877906944kernel.shmall = 134217728kernel.sem = 250 1024000 32 6553 6kernel.msgmni = 262144kernel.msgmax = 65536KERNEL.MSGMNB = 65536vm.dirty_background_ratio = 5vm.dirty_ratio= 10vm.overcommit_memory= 0vm.swappiness= 0  #如果是redhat, it is recommended to set to 5, otherwise it is likely that when the memory is low, Oom killer may kill DB2 Process Execution Sysctl- P enable parameters to take effect online ipcs-l view operating system kernel parameter settings  ------Messages Limits--------max queues System wide = 668max size of message (bytes) = 8192default max size of queue (bytes) = 16384 ------Shared Memory Limits--------max number of segments = 4096max SEG Size (Kbytes) = 18014398509465599max Total Shared memory (Kbytes) = 18014398442373116min seg Size (bytes) = 1 --- ---Semaphore Limits--------max number of arrays = 128max semaphores per array = 250max semaphores system wide = 32000max OPS per semop call = 32semaphore Max value = 32767&NBSp
    • Check the registration information, if there is a trial period, the installation succeeds, if
/opt/ibm/db2/v9.7/adm/db2licm-l
        • Installing license
          • The db2licm-l command can view license information to DB2. You can find a permanent license add to the DB2 database and put the db2ese_c.lic in a directory:
/opt/ibm/db2/v9.7/license/db2ese_c.lic, executed under the/opt/ibm/db2/v9.7/adm/directory:./db2licm-a/opt/ibm/db2/v9.7/license/ Db2ese_c.lic
    • Create an instance user
Groupadd-g 901 db2iadm1 groupadd-g 902 db2fadm1 groupadd-g 903 dasadm1 useradd-g db2iadm1-u 801-d/home/db2 Inst1-m db2inst1 useradd-g db2fadm1-u 802-d/home/db2fenc1-m db2fenc1 useradd-g dasadm1-u 803-d/home/dasa Dm1-m DASUSR1
    • Create a password for Db2inst1
passwd Db2inst1
    • Create an instance
[[email protected]] #cd/opt/ibm/db2/v9.7/instance [[Email protected]]#./dascrt-u DASUSR1 (create DB2 Management Server) [email prote Cted]]#./db2icrt-u db2inst1 db2inst1 (Create DB2 instance)
    • Start a DB instance
[Email protected] instance]# su-db2inst1 [[email protected] ~]$ Db2start
    • Create a database for the connection
[Email protected] ~]$ DB2 CREATE DATABASE Khyx_ys using CodeSet GBK territory CN
    • Setting up ports
Check to see if DB2 is turning on the TCP service [[email protected] db2inst1]# Db2set–all If you do not see the following: Db2comm=tcpip, you need to set the DB2 [[email protected] db2inst1]# Db2set Db2comm=tcpip to see if the DB2 TCP service name is configured: [[email protected] db2inst1]# DB2 get dbm CFG | Grep-i SVCENAME If SVCENAME does not have a corresponding value, you need to set the TCP service name or port of the DB2 [[email protected] db2inst1]# DB2 update dbm CFG using Svcena Me db2appname (custom name or port number) see if the TCP service for DB2 has been added to the system service in/etc/services (port number does not need this) [[email protected] db2inst1]# Cat/etc/ser Vices | grep DB2 If nothing is found, or if there is no db2appname related content, you need to include Db2appname 50000/tcp in the Services file, where 50000 is the port number of the DB2 TCP service.    Use the vi/etc/services command to go to the editor to add content, and then ESC: Wq Save to exit the editor. Restart the DB2 service to see if the Port the DB2 TCP service listens to is enabled [[email protected] ~]$ DB2 Force application All (forced stop database) [[email protected] ~]$ db2s tart [[email protected] ~]$ Netstat-na | grep 50000

Docker hit DB2 9.7 mirror mining Pit related

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.