Install DB2_V10 in Linux

Source: Internet
Author: User
Tags db2 connect db2 connect to db2 express db2 installation

Install DB2_V10 in Linux: centos5.5 has been tested. Installation of db2_v1012_linuxx64_expc.tar.gz is successful. Unzip and install [root @ L160 opt] # tar-xf unzip [root @ L160 opt] # lsdb2_v1012_linuxia32_expc.tar.gz expc lost + found rh [root @ L160 opt] # cd expc/[root @ l160 expc] # lsdb2 db2ckupgrade db2_deinstall db2_install db2ls db2prereqcheck db2setup doc [root @ L160 expc] #. /db2_install DBI1324W Support of the db2_install command is deprecated. for ........................ omitting ................................. Install into default directory (/opt/ibm/db2/V10.1 )? [Yes/no] # ask if you want to install it to this location, enter yesyesDB2 installation is being initialized .......................... omitting ...................................... the execution completed successfully. for more information see the DB2 installation log at "/tmp/db2_install.log.4516 ". create a user group and user name [root @ L160 expc] # groupadd-g 2000 db2iadm1 [root @ L160 expc] # groupadd-g 2001 db2fadm1 [root @ L160 expc] # useradd-m-g db2iadm1-d/home/db 2inst1 db2inst1 [root @ L160 expc] # useradd-m-g db2fadm1-d/home/db2fenc1 db2fenc1 [root @ L160 expc] # passwd db2inst1 // enter the same password twice [root @ L160 expc] # passwd db2fenc1 // enter the same password twice to install the License (Product License) [root @ L160 expc] # cd/opt/ibm/db2/V10.1/adm/[root @ L160 adm] # pwd // view the current directory/opt/ibm/db2/V10.1 /adm [root @ L160 adm] # chmod-R 775 * [root @ L160 adm] #. /db2licm-a/home/software/expc/db2/license/db2expc_u1_lic # do not copy this command directly, You can find the license folder in the decompressed directory. Modify LIC1402I License added successfully according to your path. LIC1426I This product is now licensed for use as outlined in your License Agreement. use of the product constitutes acceptance of the terms of the ibm license agreement, located in the following directory: "/opt/ibm/db2/V10.1/license/en_US.iso88591" Create an instance and sample database [root @ L160 adm] # cd/opt/ibm/db2/V10.1/instance [root @ l160 instance] # Chmod-R 775 * [root @ L160 instance] #. /db2icrt-p 50000-u db2fenc1 db2inst1DBI1446I The db2icrt command is running ....................... omitting ............................... DBI1070I Program db2icrt completed successfully. [root @ L160 instance] # su-db2inst1 // switch to db2inst1 user [db2inst1 @ L160 ~] $ Db2sampl Starting the DB2 instance... creating database "SAMPLE "... connecting to database "SAMPLE "... creating tables and data in schema "DB2INST1 "... creating tables with XML columns and XML data in schema "DB2INST1 "... stopping the DB2 instance... 'db2sampl' processing complete. [db2inst1 @ L160 ~] $ Db2startSQL1063N DB2START processing was successful. [db2inst1 @ L160 ~] $ Db2 connect to sample Database Connection Information Database server = DB2/LINUXX8664 10.1.2 SQL authorization ID = DB2INST1 Local database alias = SAMPLE [db2inst1 @ L160 ~] $ Db2 "select * from staff" id name dept job years salary comm ------ --------- 10 Sanders 20 Mgr 7 98357.50 -........... ............. omitting ............................... 350 Gafney 84 Clerk 5 43030.50 188.00 35 record (s) selected. create a das Management Server to allow remote clients to control the database server with the control center. You need to install the das on the database server. Of course, if it is just a remote connection instead of a remote management server, you do not need to install it, here I have installed it. [Root @ L160 instance] # groupadd-g 2002 db2asgrp [root @ L160 instance] # useradd-m-g db2asgrp-d/home/db2as db2as [root @ L160 instance] # passwd db2as // enter the same password for user db2as twice. new UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. [root @ L160 instance] # su-db2as [db2as @ L160 ~] $ Su-Password: [root @ L160 ~] # Cd/opt/ibm/db2/V10.1/instance/[root @ L160 instance] #. /dascrt-u db2asDBI1070I Program dascrt completed successfully. [root @ L160 instance] # su-db2as [db2as @ L160 ~] $ Db2admin startsql00009w The DB2 Administration Server is already active. [db2as @ L160 ~] $ Su-db2inst1 // confirm the service name Password of the db2inst1 instance: [db2inst1 @ L160 ~] $ Db2 get dbm cfg | grep SVCENAME TCP/IP Service name (SVCENAME) = SSL service name (SSL_SVCENAME) = [db2inst1 @ L160 ~] $ Db2 update dbm cfg using SVCENAME 50000DB20000I The update database manager configuration command completedsuccessfully. [db2inst1 @ L160 ~] $ Db2 get dbm cfg | grep SVCENAME TCP/IP Service name (SVCENAME) = 50000 SSL service name (SSL_SVCENAME) = [db2inst1 @ L160 ~] $ Db2licm-l // check the License. For svcename, the Product name: "DB2 Express-C" License type: "Unwarranted" Expiry date: "Permanent" Product identifier: "db2expc" Version information: "10.1" Max number of CPUs: "2" Max amount of memory (GB): "4" Enforcement policy: "Soft Stop"

Related Article

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.