Copyright Notice: This article can be reproduced, please be sure to indicate the original source and author information in hyperlink when reprint. Original Source: http://www.aiview.com/notes/db2_inst_tool.htm Author: Zhang Yang Alex_doesAThotmail.com Last updated: 2004-7-14
table of Contents
Text reference resources
text
In the Linux platform, DB2 UDB V8.1 provides two installation methods for the command line and graphical interface. Although the graphical interface simplifies the complexity of the installation, the installation process requires artificial intervention, the time consumption is relatively long, and in the kernel There is still a problem that the GUI installation interface cannot be started under the new Linux version, although it can be solved by setting the environment variable, it is still a bit trouble.
Of course, if you use the command line to manually install this problem, you need to manually complete a lot of steps. If the installation or uninstallation is more frequent, it is better to write the entire installation process to the Shell script.
Below is a shell script I have completed for installation and uninstall. When you install it, you can complete all installations when you install it. Including the necessary users and groups, create a DAS service, and instances, set the registry variable, set automatic start, etc. in the system registration service name and service port.
Alternatively, you can specify ignore the copy installation file or ignore the creation time or group by three optional parameters, or to save the installation time.
The uninstall function can be used to uninstall the database installed using this installation script, including delete instances and DAS services, clear the previously created users and groups, recovery system configuration files, etc., can specify the optional selection of Package when deleting the installation at the same time. file. At the beginning of the script, some parameters can be modified according to the actual environment, such as the instance name to be created, used for the username and group name of DAS, the default settling path of the database, etc., you can modify before using this script.
Save this script as a file, this example is instdb.sh, add executable properties, run under root privilege, for example:
# ./instdb2 -d / mnt / db2udb8forlinux Use source path '/ mnt / db2udb8forlinux' to install; # ./instdb2 -d / mnt / db2udb8forlinux -remove -all delete the DB2 installation already performed, and remove all copied to installation The Package file of the directory. This article is tested in the following environment: Redhat Enterprise Linux 3.0 db2 v8.1 for Linux
Reference resource
Download script code
IBM DB2 Developer Garden http://www-900.ibm.com/developerWorks/cn/dmdd/certify/index.shtml IBM DB2 Information Center http://publib.boulder.ibm.com/infocenter/db2help/index. JSP "DB2 UDB V8.1 for Linux, UNIX, Windows Database Management" George Baklarz, Bill Wong, Machinery Industry Press "DB2 Database Management and Application Tutorial" Zhuang Jicheng, Tsinghua University Press Publishing