Installation and uninstall of DB2 UDB V8.1 under Linux Platform

Source: Internet
Author: User
Tags command line db2 db2 installation manual variables linux

DB2 UDB under the Linux platform V8.1 provides two ways to install the command line and the graphical interface. Although the graphical interface simplifies the installation complexity through interaction, the installation process requires manual intervention, takes a relatively long time, and there is a problem in the kernel's newer Linux version that does not start the GUI installation interface, although it can be solved by setting environment variables.

Of course, if you use the command-line manual installation does not exist this problem, but need to complete a number of steps manually, if the installation or uninstall more frequently, it would be better to write the entire installation process to the shell script easy to execute.

The following is a shell script that I have completed for installation and uninstall, when the database is installed, simply specify the source path of the installation file to complete the installation. This includes creating the necessary users and groups, creating DAS Services and instances, registering service names and service ports in the system, setting registry variables, setting up automatic startup, and so on.

You can also use three optional parameters to specify that you want to ignore the copy installation file, or to create a user or group that saves installation time.

The uninstall feature can be used to uninstall the database installed using this installation script, including deleting instances and DAS Services, clearing the user and group created earlier, restoring the system's profile, and so on, and optionally specifying the deletion of the package file that was copied at the time of installation.

At the beginning of the script, some parameters can be modified according to the actual environment, such as the name of the instance to be created, the username and group name used for Das, the default path to establish the database, and so on, before the script can be modified.

Save this script as a file, this example saves as instdb.sh, adds an executable property, and runs under root permissions, for example:

#./instdb2-d/mnt/db2udb8forlinux

Use the source path '/mnt/db2udb8forlinux ' for installation;

#./instdb2-d/mnt/db2udb8forlinux-remove-all

Remove the DB2 installation that has been made, and delete all package files that have been copied to the installation directory.

The scripts in this article are tested through the following environment:

RedHat Enterprise Linux 3.0

DB2 V8.1 for 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.