[DB2] Install DB2 v9.7 under Linux

Source: Internet
Author: User
Tags db2 installation



1. Unzip the DB2 installation package


tar -zxvf v9.7_linuxx64_server. tar. gz


2. Enter the server directory to perform the installation check


CD server. /db2prereqcheck


3. Run the Setup program


[[email protected]] ./ db2_install

Do you want to choose another directory for installation? [yes / no]

--Enter no under the default installation opt, select yes and enter the installation directory yourself

Specify one of the following keywords to install the DB2 product

--Enter ESE

ESE

Initializing DB2 installation.

Total number of tasks to be performed: 47

The total estimated time for all tasks to be performed is: 2070

Task # 1 starts

Description: Checking acceptance of license agreement

Estimated time 1 second

Task # 1 ends

...

Mission # 47 Start

Description: Registering for the DB2 update service

Estimated time 30 seconds

Mission # 47 End

Mission # 48 Start

Description: Updating the global profile registry

Estimated time 3 seconds

Mission # 48 End

Execution completed successfully. 


4. 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


Display after execution: lic1402i License added successfully. And then db2licm-l, you'll find that your DB2 has become permanent, you're done, and you won't be afraid DB2 database is out of date



5. Create the user groups and users required to run the DB2


901902903801 -d/home/db2inst1-m  802 -d/home/db2fenc1-m 803 -d/home/dasadm1-m  DASUSR1


6. Create a password for Db2inst1


passwd Db2inst1


7. Create an instance


 
[[email protected]]#cd /opt/ibm/db2/V9.7/instance

[[email protected]]#./dascrt -u dasusr1

SQL4406W  The DB2 Administration Server was started successfully.

DBI1070I  Program dascrt completed successfully.


[[email protected]]#./db2icrt -u db2inst1 db2inst1

DBI1070I  Program db2icrt completed successfully.


8. Launch the DB2 instance


 
[[email protected]]#su - dasusr1

[[email protected]]$. das/dasprofile

[[email protected]]$db2admin start


[[email protected]]$su - db2inst1

[[email protected]]$. sqllib/db2profile

[[email protected]]$db2start


9. Close and start the database


 
[[email protected]]$db2stop

[[email protected]]$db2 force applications all

[[email protected]]$db2start


10. Create a sample Library


 
[[email protected]]$cd /opt/ibm/db2/V9.7/bin

[[email protected]]$./db2sampl


11. Set DB2 self-boot


 
[[email protected]]#cd /opt/ibm/db2/V9.7/instance

[[email protected]]#./db2iauto -on db2inst1


12. Configure TCPIP


 
[[email protected]]#su - db2inst1

[[email protected]]$db2set DB2COMM=TCPIP


[[email protected]]$db2 get dbm cfg |grep SVCENAME

TCP/IP Service name                          (SVCENAME) = SSL service name                         (SSL_SVCENAME) = [[email protected]]$tail /etc/services

DB2_db2inst1 60000/tcp

DB2_db2inst1_1 60001/tcp

DB2_db2inst1_2 60002/tcp

DB2_db2inst1_END 60003/tcp


[[email protected]]$vim /etc/services

修改成如下

DB2_db2inst1 50000/tcp

DB2_db2inst1_1 50001/tcp

DB2_db2inst1_2 50002/tcp

DB2_db2inst1_END 50003/tcp


[[email protected]]$db2 update dbm cfg using SVCENAME 50000 [[email protected]]$db2stop

[[email protected]]$db2start


Attached: If the system is CENTOS7, 50000 ports may be disabled due to firewall problems



Workaround:



Su-root



Systemctl Stop Firewalld.service



Or join the 50000 port to the Firewall trust:



Firewall-cmd--permanent--zone=public--add-port=50000/tcp



To restart the firewall:


Systemctl Stop Firewalld.servicesystemctl start Firewalld.service


[DB2] Install DB2 v9.7 under Linux


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.