Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install DB2 under Ubuntu 8.04

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "Ubuntu 8.04 how to install DB2", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn how to install DB2 under Ubuntu 8.04 "this article.

On the IBM System x3550 server, install the DB2 v9.7 ESE trial database with the Ubuntu DB2_install command in the Ubuntu Server 8.0.4 operating system.

I. steps before Ubuntu DB2 installation

1. Install several packages and execute the command:

Sudo apt-get install libaio1

Sudo apt-get install libstdc++5

2.copy installs the files to the target system and unzips them. If you are unzipping from windwos and then uploading to Ubuntu, you need to set the installation file and related files for executable properties.

3. Set ulimit (this step is skipped for Server version)

4. Modify kernel parameters

1) View kernel parameters

Ipcs-l

The display is as follows:

View plaincopy to clipboardprint?

Cuser@localhost:~$ ipcs-l

-Shared Memory Limits-

Max number of segments = 4096

Max seg size (kbytes) = 32768

Max total shared memory (kbytes) = 8388608

Min seg size (bytes) = 1

-Semaphore Limits-

Max number of arrays = 128,

Max semaphores per array = 250

Max semaphores system wide = 32000

Max ops per semop call = 32

Semaphore max value = 32767

-Messages: Limits-

Max queues system wide = 16

Max size of message (bytes) = 8192

Default max size of queue (bytes) = 16384

Cuser@localhost:~$ ipcs-l

-Shared Memory Limits-

Max number of segments = 4096

Max seg size (kbytes) = 32768

Max total shared memory (kbytes) = 8388608

Min seg size (bytes) = 1

-Semaphore Limits-

Max number of arrays = 128,

Max semaphores per array = 250

Max semaphores system wide = 32000

Max ops per semop call = 32

Semaphore max value = 32767

-Messages: Limits-

Max queues system wide = 16

Max size of message (bytes) = 8192

Default max size of queue (bytes) = 16384

2) Edit / etc/sysctl.conf file. If this file does not exist, it should be created. Add the following:

View plaincopy to clipboardprint?

Kernel.sem=250 256000 32 1024

# example: shmmax for 64-bit system

Kernel.shmmax=1073741824

# example: 90% shmall for 4GB memory

Kernel.shmall=943718

Kernel.msgmax=65535

Kernel.msgmnb=65535

Kernel.sem=250 256000 32 1024

# example: shmmax for 64-bit system

Kernel.shmmax=1073741824

# example: 90% shmall for 4GB memory

Kernel.shmall=943718

Kernel.msgmax=65535

Kernel.msgmnb=65535

For a description of these parameters, refer to DB2 infocenter:

It is recommended that you set the SHMMAX value to equal the amount of physical memory on the system. However, the minimum required on x86 systems is 268435456 (256 MB), while on 64-bit systems, it will be 1073741824 (1 GB).

By default, SHMALL is set to 8 GB (8388608 KB = 8 GB). If you have more physical memory than this value, and you want to use that physical memory for DB2, this parameter increases to about 90% of your computer's physical memory. For example, assuming that there is 16 GB of memory on the computer system and uses that memory primarily for DB2, then SHMALL should be set to 3774873 (90% of 16 GB is 14.4 GB; divided by 4 KB (which is the base page size) and the result is 3774873).

If you are upgrading to DB2 version 9.7 and do not use the default SHMALL setting, you must increase the SHMALL setting by an additional 4 GB. The Fast Communication Manager (FCM) requires that memory be increased in this way for use by other buffers or channels.

The kernel parameter sem consists of four tags: SEMMSL, SEMMNS, SEMOPM, and SEMMNI. SEMMNS is the result of multiplying SEMMSL by SEMMNI. The database manager requires that the number of arrays be increased as needed (SEMMNI). In general, SEMMNI should be twice the expected number of agents on the system multiplied by the number of logical partitions on the database server computer plus the number of local application connections on the database server computer.

MSGMNI will affect the number of agent processes that can be started, MSGMAX will affect the size of messages that can be sent in a queue, and MSGMNB will affect the queue size.

MSGMAX should be changed to 64 KB (that is, 65535 bytes) and MSGMNB should be increased to 65535.

3) run sysctl with the-p parameter to load the sysctl setting from the default file / etc/sysctl.conf: sudo sysctl-p

II. Ubuntu DB2 installation database

1. Run the installation command

Sudo. / db2_install

two。 Specify the installation path, generally do not change the path, English environment type "no" plus enter, Chinese environment type "no" plus enter.

3. Choose to install the product, here I choose ESE, and then enter.

4. All the way to install, finally prompt a warning that there is a small mistake, ignore it, it is finished.

III. Post-installation steps of Ubuntu DB2

1. Create users and user groups

1) create a user group:

Sudo groupadd-g 999 db2iadm1

Sudo groupadd-g 998 db2fadm1

Sudo groupadd-g 997 dasadm1

2) create a user:

Sudo useradd-u 1004-g db2iadm1-m-d / home/db2inst1 db2inst1

Sudo useradd-u 1003-g db2fadm1-m-d / home/db2fenc1 db2fenc1

Sudo useradd-u 1002-g dasadm1-m-d / home/dasusr1 dasusr1

3) set the user's password

Sudo passwd db2inst1

Sudo passwd db2fenc1

Sudo passwd dasusr1

two。 Create a Ubuntu DB2 management service

Sudo / opt/ibm/db2/V9.7/instance/dascrt-u dasusr1

3. Create a Ubuntu DB2 instance

Sudo / opt/ibm/db2/V9.7/instance/db2icrt-a server-u db2fenc1 db2inst1

4. Set the port used by Ubuntu DB2

Su-db2inst1

/ bin/bash

Chsh-s / bin/bash db2inst1 (bash is required for DB2, this command modifies the default sh)

/ home/db2inst1/sqllib/db2profile

Db2 update dbm cfg using svcename 50000

5. Set up Ubuntu DB2 communication protocol

Db2set DB2COMM=tcpip

6. Start Ubuntu DB2

Db2start

The above is all the contents of the article "how to install DB2 under Ubuntu 8.04". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report