Инсталляция IBM DB2 под Linux. Установка (переустановка) сервера IBM DB2 Db2 express c 10.5 проблемы с установкой

This task describes how to start the DB2 Setup wizard on Windows. You will use the DB2 Setup wizard to define your installation and install your DB2® database product on your system.

About this task

Restrictions

  • You cannot have more than one instance of the DB2 Setup wizard running in any user account.
  • The DB2 copy name and the instance name cannot start with a numeric value.The DB2 copy name is limited to 64 English characters consisting of the characters A-Z, a-z and 0-9.
  • The DB2 copy name and the instance name must be unique among all DB2 copies.
  • The use of XML features is restricted to a database that has only one database partition.
  • No other DB2 database product can be installed in the same path if one of the following product is already installed:
    • IBM Data Server Runtime Client
    • IBM Data Server Driver Package
    • DB2 Information Center
  • The DB2 Setup wizard fields do not accept non-English characters.
  • If you enable extended security on Windows Vista or Windows 2008, or higher, users must belong to the DB2ADMNS or DB2USERS group to run local DB2 commands and applications because of an extra security feature (User Access Control) that limits the privileges that local administrators have by default. If users do not belong to one of these groups, they will not have read access to local DB2 configuration or application data.

Before you begin

Before you start the DB2 Setup wizard:

  • If you are planning on setting up a partitioned database environment, refer to "Setting up a partitioned database environment".
  • Ensure that your system meets installation, memory, and disk requirements.
  • If you are planning to use LDAP to register the DB2 server in Windows operating systems Active Directory, you should extend the directory schema before you install, otherwise you will need to manually register the node and catalog the databases. For more information, see the "Extending the Active Directory Schema for LDAP directory services (Windows)" topic.
  • If you are planning to use the IBM® Tivoli® Monitoring for Databases: DB2 Agent, before installing your DB2 product see topic "Installing IBM Tivoli Monitoring for Databases: DB2 Agent with the DB2 installer" for details, limitations and restrictions.
  • You must have a local Administrator user account with the recommended user rights to perform the installation. In DB2 database servers where LocalSystem can be used as the DAS and DB2 instance user and you are not using the database partitioning feature, a non-administrator user with elevated privileges can perform the installation.

    Note: If a non-Administrator user account is going to do the product installation, then the VS2005 runtime library must be installed before attempting to install a DB2 database product. The VS2005 runtime library is needed on the operating system before the DB2 database product can be installed. The VS2005 runtime library is available from the Microsoft runtime library download website. There are two choices: choose vcredist_x86.exe for 32-bit systems or vcredist_x64.exe for 64-bit systems.

  • Although not mandatory, it is recommended that you close all programs so that the installation program can update any files on the computer without requiring a reboot.
  • Installing DB2 products from a virtual drive or an unmapped network drive (such as \\hostname\sharename in Windows Explorer) is not supported. Before attempting to install DB2 products, you must map the network drive to a Windows drive letter (for example, Z:).

Procedure

To start the DB2 Setup wizard:

  1. Log on to the system with the local Administrator account that you have defined for the DB2 installation.
  2. If you have the DB2 database product DVD, insert it into the drive. If enabled, the autorun feature automatically starts the DB2 Setup Launchpad . If the autorun does not work, use Windows Explorer to browse the DB2 database product DVD and double-click the setup icon to start the DB2 Setup Launchpad .
  3. If you downloaded the DB2 database product from Passport Advantage®, run the executable file to extract the DB2 database product installation files. Use Windows Explorer to browse the DB2 installation files and double-click on the setup icon to start the DB2 Setup Launchpad .
  4. From the DB2 Setup launchpad, you can view installation prerequisites and the release notes, or you can proceed directly to the installation. You may want to review the installation prerequisites and release notes for late-breaking information.
  5. Click Install a Product and the Install a Product window will display the products available for installation.

    If you have no existing DB2 database products installed on your computer, launch the installation by clicking Install New . Proceed through the installation following the DB2 Setup wizard"s prompts.

    If you have at least one existing DB2 database product installed on your computer, you can:

    • Click Install New to create a new DB2 copy.
    • Click Work with Existing to update an existing DB2 copy, to add function to an existing DB2 copy, upgrade an existing DB2 Version 8, Version 9.1, or Version 9.5 copy, or to install an add-on product.
  6. The DB2 Setup wizard will determine the system language, and launch the setup program for that language. Online help is available to guide you through the remaining steps. To invoke the online help, click Help or press F1 . You can click Cancel at any time to end the installation.

Results

Your DB2 database product will be installed, by default, in the Program_Files \IBM\sqllib directory, where Program_Files represents the location of the Program Files directory.

If you are installing on a system where this directory is already being used, the DB2 database product installation path will have _ xx added to it, where xx are digits, starting at 01 and increasing depending on how many DB2 copies you have installed.

You can also specify your own DB2 database product installation path.

What to do next

  • Verify your installation.
  • Perform the necessary post-installation tasks.

For information about errors encountered during installation, review the installation log file located in the My Documents\DB2LOG\ directory. The log file uses the following format: DB2- ProductAbrrev - DateTime .log , for example, DB2-ESE-Tue Apr 04 17_04_45 2008.log .

If this is a new DB2 product installation on Vista 64−bit, and you will use a 32−bit OLE DB provider, you must manually register the IBMDADB2 DLL. To register this DLL, run the following command: c:\windows\SysWOW64\regsvr32 /s c:\ Program_Files \IBM\SQLLIB\bin\ibmdadb2.dll where Program_Files represents the location of the Program Files directory.

If you want your DB2 database product to have access to DB2 documentation either on your local computer or on another computer on your network, then you must install the DB2 Information Center . The DB2 Information Center contains documentation for the DB2 database system and DB2 related products. By default, DB2 information will be accessed from the web if the DB2 Information Center is not locally installed.

DB2 Express® Edition and DB2 Workgroup Server Edition memory limits If you are installing DB2 Express Edition , the maximum allowed memory for the instance is 4 GB.

If you are installing DB2 Workgroup Server Edition , the maximum allowed memory for the instance is 64 GB .

The amount of memory allocated to the instance is determined by the INSTANCE_MEMORY database manager configuration parameter. Important notes when upgrading from Versions 9.1 or 9.5:

  • If the memory configuration for your Version 9.1 DB2 database product exceeds the allowed limit, the DB2 database product might not start after upgrading to the current version.
  • The self tuning memory manager will not increase your overall instance memory limit beyond the license limits.

а значит можно применять на практике и полнофункциональную версию DB2 10.1.

Если сравнивать бесплатные версии DB2 Express-C 9.7 и 10, то очевидно преимущество - теперь объем используемой оперативной памяти увеличен с 2 до 4 Гб , что не может не радовать.

Скачать бесплатную и демонстрационную коммерческую версию возможно здесь - http://www-01.ibm.com/software/data/db2/linux-unix-windows/download.html (для скачивания потребуется IBM ID, но регистрация быстрая и бесплатная).

Посмотрим, как выглядит процесс установки и настройки на примере бесплатной версии.

Скачиваем дистрибутив, распаковываем его и запускаем файл setup.exe, появляется приветственное окно.

Переходим на закладку «Установить продукт» и нажимаем «Установить новую копию» напротив единственного предлагаемого варианта (в коммерческой версии есть возможность выбора редакции СУБД)

Начало установки

Принимаем лицензионное соглашение

Оставляем обычную установку и продолжаем. Для 1С этого будет достаточно.

Если вы хотите установить DB2 только на один компьютер - файл ответов можно не создавать

Указываем каталог установки. Если у вас выделен отдельный дисковый массив на базы DB2 - можно выполнять установку сразу туда, это позволит по умолчанию создавать новые базы на том же диске, но параметр, отвечающий за это, можно всегда поменять.

От SSH я отказался. Это дополнительная возможность администрирования сервера, которую желательно использовать при управлении серверами через публичные сети по незащищенному каналу. В локальной сети особого смысла от этого нет.

Создаем новую учетную запись для запуска процессов сервера

Тут указываем порт запуска СУБД. Почт по умолчанию необходимо менять в том случае, если на одной машине запускается несколько DB2, либо есть желание сменить порт для обеспечения дополнительной небольшой защиты (существует рекомендация назначать стандартным сервисам нестандартные порты, что немного может сбить с толку потенциального взломщика, по крайней мере, неопытного).

Ждем завершения установки и видим сообщение об успехе

Сразу после окончания установки добавляем важный параметр, который позволит оптимизировать работу DB2 для 1С:

Открываем командное окно

И выполняем команду
db2set DB2_WORKLOAD=1C
если запустить просто db2set, то система покажет список установленных параметров

Затем перезапускаем СУБД:
db2stop
db2start

Создаем новую информационную базу в 1С, при этом в качестве пользователя сервера БД необходимо указать db2admin, которого вы создали в процессе установки

Не забываем проверить, что в каталоге с сервером приложений 1С размещен файл-семафор db2loadapion , что позволит ускорить процесс загрузки базы данных из dt-файла.

На этом все. Осталось загрузить в созданную базу dt-файла или файл конфигурации и работу можно начинать.

"Центра управления" в DB2 10.1 больше нет, но, кроме командной строки можно установить бесплатный инструмент для администрирования DB2 - IBM Data Studio.

Ставил сборку предоставляемую IBM, выложенную на сайте users.v8.1c.ru. Но насколько понимаю она ничем не отличается от оригинала
Сначало я попытался поставить ручками как это прописано в инструкции от 1С (см. инструкцию по установке сервера 1С 8.1). Честно скажу потерпел неудачу. Сервер у меня так и не стартовал. Потом на сайте IBM я прочитал о графическом инсталяторе. В дистрибутиве есть файл./install запускаем и все запросы идут в графическом режиме. По факту я только соглашался и все… После этого все заработало. Вот инструкция от Аристархова Андрея, представителя IBM в 1С, ее я и руковоствовался при установке, отличие только в том, что я воспользовался графическим инсталятором:

Общие рекомендации:
Если возникли какие-то вопросы, загляните в документацию, вероятней всего там вы найдете ответ на свой вопрос. Особенно это актуально, если продукт для вас новый, или вы начинаете работать с новой версией продукта.
При возникновении проблем имеет смысл анализировать логи (как лог-файлы DB2, так и технологический журнал 1С), т.к. они содержат массу полезной информации: например, сообщения об ошибках или текст исполняемого запроса.
Подавляющее большинство проблем можно решить при помощи логов, документации и поиска (особенно по кодам ошибок). Например, посмотрев код ошибки в лог-файле, и сделав поиск в документации по этому коду, вы найдете рекомендации по устранению ошибки.
Если хочется побыстрей что-то настроить в операционной системе Linux, попробуйте открыть существующий конфигурационный файл. Как правило, там много комментариев и большинство параметров уже прописаны. Или посмотрите, нет ли в каталоге файла xxx.sample, который предоставляется в качестве примера.
При работе с DB2 не надо бояться командной строки. В ней можно в несколько раз быстрей сделать все то же самое, что и в графическом интерфейсе.
Инструкция по установке DB2 под Linux

Все действия выполняются под пользователем root, если не сказано иное.

Сначала необходимо настроить параметры ядра Linux для работы DB2. Согласно документации для этого необходимо отредактировать /etc/sysctl.conf, чтобы он содержал следующие строки:

  1. Это значение для Linux 64-bit
    kernel.shmmax=1073741824
    # Это значение для Linux 32-bit
    kernel.shmmax=268435456
    # А это верно для обоих вариантов
    kernel.msgmax=65535
    kernel.msgmnb=65535

После редактирования файла необходимо запустить

Внесенные изменения вступили в силу.

Подробная информация о назначении этих параметров

Данные настройки были проверены для следующих версий Linux:
FedoraCore 6×86
FedoraCore 6×86_64
RedHat 4 PPC
RedHat 4 s390x (IBM System z - мэйнфрейм)
После этого можно приступать к установке DB2.

Прежде чем начать инсталляцию, убедитесь, что у вас установлены пакеты обратной совместимости для libstdc++. В частности, для FC6 необходимы пакеты

compat-libstdc+±33–3.2.3–61
compat-libstdc+±296–2.96–138

Можно также при установке Linux для «разработчика» выбрать поддержку старых программ, в этот раздел входят указанные пакеты.

Берем архив с дистрибутивом DB2 и распаковываем его. Например:

tar xfz db2exc_912_1Cspecial17705_LNX_x86_64.tar.gz
cd exp/disk1

Запускаем

./db2_install

Принимаем по-умолчанию каталог установки (/opt/ibm/db2/V9.1)

После чего ставим сам продукт (пишем в строке вопроса: EXP - т.е. DB2 Express)

Создаем пользователей, необходимых для работы DB2

useradd das
useradd db2inst
useradd db2fenc

cd /opt/ibm/db2/V9.1/instance

Создаем DB2 Administration Server (DAS).

./dascrt das

Сервер автоматически запустится от имени пользователя das

Создаем экземпляр DB2, настроенный на работу через порт 50000 (порт DB2 по-умолчанию)

./db2icrt -u db2fenc -p 50000 db2inst

su - db2inst

Конфигурируем DB2 для работы с 1С

db2set DB2_WORKLOAD=1C

Запускаем экземпляр DB2

Возвращаемся в root через Ctrl-D (logout)

Если необходимо, чтобы DB2 запускалась автоматчески при старте системы, выполняем команду:

/opt/ibm/db2/V9.1/instance/db2iauto -on db2inst

Установка и конфигурирование сервера 1С:Предприятия

Для начала необходимо ус