Db2 client linux install

Keith Kim

And need to set up a couple of things. Run client:

$ db2

3.1. Create sample database:

db2 => create database sample
DB20000I The CREATE DATABASE command completed successfully.

3.2. Set up port 50000:

db2 => UPDATE DBM CFG USING SVCENAME 50000
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
SQL1362W One or more of the parameters submitted for immediate modification
were not changed dynamically. Client changes will not be effective until the
next time the application is started or the TERMINATE command has been issued.
Server changes will not be effective until the next DB2START command.

$ db2 get dbm cfg | grep SVCENAME
TCP/IP Service name (SVCENAME) =
SSL service name (SSL_SVCENAME) =

$ db2set DB2COMM=tcpip
$ db2set -all
[i] DB2COMM=TCPIP
[g] DB2_COMPATIBILITY_VECTOR=MYS

To stop and start again and test

$ db2stop
SQL1064N DB2STOP processing was successful.

$ db2start

$ db2 connect to sample user kkim using
Other helpful commands, for diagnostic output:

4. JDBC

Make sure the port is defined in /etc/services file, if not add the line:
# vi /etc/services

db2c_db2inst1 50000/tcp # db2

JDBC String,
jdbc:db2://myhost:50000/sample

Optional-Static IP setting in Ubuntu 18

$ sudo vi /etc/netplan/50-cloud-init.yaml

after editing it appropriately,

References

DB GUI clients

Источник

4. Installing DB2 using db2setup

The purpose of this section is to walk you through a typical install of DB2 Version 7.1 on Linux. The following section, Section 6 , tells you how to create both a DB2 Administration Server and a DB2 instance. For in-depth information on the components offered by DB2 Version 7.1, consult the following documents:

DB2 for UNIX Quick Beginnings

DB2 Personal Edition for Linux Quick Beginnings

DB2 Connect Personal Edition for Linux Quick Beginnings

For the purposes of this document, I’ll assume that you have a copy of DB2 Version 7.1 on CD-ROM. If you download a copy from IBM, just adjust the path /mnt/cdrom in the following instructions to reflect the directory created by the tar command.

Some distributions disable execute privileges on CD-ROM devices by default. To mount a CD-ROM with execute permissions at mount point /mnt/cdrom , issue the following command as root:

bash# mount -o exec /mnt/cdrom

4.1. Using the db2setup utility

You’ll find the following executables on the root directory of the DB2 Version 7.1 installation CD-ROM:

db2setup : Use the db2setup command to install DB2 Version 7.1, to create or modify DB2 instances, and to create a DB2 Administration Server. Once you install DB2, db2setup is copied to the /usr/IBMdb2/V7.1/install directory to enable you to create or modify instances without the CD-ROM.

db2_install : The db2_install command provides an alternate means of installing DB2 RPMs. Unlike db2setup , it does not enable you to create a DB2 instance or Administration Server, or install a license key. I highly recommend db2setup .

Читайте также:  Install qmake in linux

db2_deinstall : Use the db2_deinstall command to uninstall the DB2 Version 7.1 packages on your system. For more information, see Section 7 .

The db2setup command provides a terminal-based text menu for your installation and instance creation options. Unfortunately, db2setup on Linux sometimes encounters a few formatting bugs in terminal emulators. Running db2setup from the TTY console works well. Within an X session, the rxvt or xterm terminals work quite well, but gnome-terminal is rather frustrating to use. If the text menu formats incorrectly, press CTRL-L to refresh the menu.

4.2. Installing DB2 components

The following instructions assume that you are using db2setup to install DB2.

To select or deselect a component, highlight the component using the cursor keys and press ENTER .

To change the options for a component, highlight [ Customize. ] and press ENTER .

To install your selected components, highlight [ OK ] on the Install DB2 V7 menu and press ENTER .

The common DB2 files are installed in the /usr/IBMdb2/V7.1/ directory. When you create an instance, a directory called sqllib is created in the corresponding user’s home directory. The sqllib directory contains symbolic links to the executables and other files in /usr/IBMdb2/V7.1/ .

The following list describes some of the common DB2 components that you can install, including estimates of the size required for each component.

Description of DB2 components

The Administration Client enables database administrators to administer local or remote DB2 servers from the command line. This component, without Java support or the Control Center, requires about 20 MB of disk space.

The Control Center ( db2cc ) is an optional part of many DB2 components. It gives database administrators a graphical interface for administering local or remote DB2 servers. The Control Center includes the DB2 Information Center ( db2ic ), which gives you a graphical interface that provides a tree view of the DB2 documentation installed on your workstation organized by task or by title.

Note that both the Control Center and Information Center are Java applications, so their performance depends on your system’s processor speed and available memory. This component requires about 90 MB of disk space.

You probably want to install the Control Center.

These components determine the state of your DB2 installation as a database server. The core capabilities of the components are the same. The difference between Enterprise Edition and Workgroup Edition primarily has to do with how they are licensed—Enterprise Edition is licensed on a per-processor basis with unlimited users, while Workgroup Edition is licensed on a per-user basis. Enterprise Edition also gives you the capability to enable DB2 clients to connect to mainframe databases, like DB2 for OS/390 or DB2 for OS/400. In contrast, Personal Edition is a single user database server that is useful only for developing DB2 applications. You cannot use Personal Edition as a server because Personal Edition does not accept incoming remote connections.

Читайте также:  Systemctl set default linux

Adding one of these components requires about 40 MB of disk space.

This option enables your DB2 server to replicate data to other DB2 servers, and, with additional software, across non-DB2 servers as well. This option requires about 5 MB of disk space.

Distributed Join for DB2 Data Sources

This option enables your DB2 server to participate in a join with data from other database servers. This option requires about 2 MB of disk space.

The Application Development Client component installs the headers and libraries that you need to create applications using embedded SQL for C and C++, Call Level Interface ( CLI ), Java Database Connectivity ( JDBC ), or embedded SQL for Java ( SQLJ ). You also have the option of installing the source code for sample applications that demonstrate much of the functionality of DB2.

If you plan on developing applications for DB2, install the sample applications. The sample directories in /usr/IBMdb2/V7.1/samples/ contain build scripts ( bld*** ) that include the compile and link options suitable for your own applications.

If you are trying to develop applications and you get an error like «That command is not supported in this environment» while trying to precompile a file, it’s because you either did not install the Application Development Client, or you installed it after you created an instance and you have not used the db2iupdt command to update the instance. See Section 9.1 for more information on db2iupdt .

Including the sample applications, this component requires about 10 MB of disk space.

DB2 Product Library (HTML documentation)

Documentation is installed into the /usr/IBMdb2/V7.1/doc/ directory. For each language that you install, the DB2 installer creates a subdirectory with a five-character name corresponding to the language locale. Issue the db2help command to fire up your Web browser with a page that links to the documentation installed with DB2 .

The English HTML (En_US) documentation requires about 90 MB of disk space.

Источник

How to install IBM DB2 in Ubuntu

In this article, we will see how to install IBM DB2 in Ubuntu step by step.

How to install IBM DB2 in Ubuntu

Prerequisites are:
Package requirements
Package requirements for SLES and RHEL distributions:

  • libpam.so.0 (32-bit) is required for Db2 database servers to run 32-bit non-SQL routines and JDBC type 2 driver applications in 32-bit JDK.
  • libpam.so.0 is required by IBM data server clients for Db2 user authentication.
  • libaio.so.1 is required for Db2 database servers that use asynchronous I/O.
  • libstdc++.so.6is required for Db2 database servers and clients.
  • libstdc++33and libstdc++43 are required for SLES 11.
  • The ksh93 Korn shell is required for all Db2 database systems.

1. Go to google then search for IBM db2 download or copy either of below links and paste in web browser and hit enter.

Читайте также:  Линукс минт время сбивается

2. Click on Download free community edition.

3. Then, signup with your information, after click on verify email, we will receive a code to our email. Then, we have to paste here.

How to download and install IBM DB2 database on Windows

4. Click on download beside Linux(x64).

How to install IBM DB2 in Ubuntu

5. Once download is completed, go to the downloads directory and untar the downloaded tar file.

 tar xvzf v11.5.8_linuxx64_server_dec.tar.gz

6. Update package index on Ubuntu.

7. Now install following missing components one by one.

sudo apt-get install lib32stdc++6 sudo apt-get install libpam0g:i386 sudo apt-get install libstdc++5 libstdc++6 sudo apt-get install libaio-dev sudo apt-get install gcc-4.9 sudo find / -name "libpam.so*" sudo ln -s /lib/i386-linux-gnu/libpam.so.0 /lib/libpam.so

8. Now go to extracted(Downloads) directory and run ./db2_install.

Type yes twice and hit enter.

9. Type SERVER and hit enter.

10. Lists the Db2 products and features installed on Linux using below command.

11. To check the version installed run the below command by going to installed directory.

So in this article, we have seen How to install IBM DB2 in Ubuntu sucessfully.

Below is the video link for the same.

Источник

ChoudharySumit.com

In this post we will go through steps of DB2 11.1 installation on Linux. Before installing any DB2 LUW product, you should ensure your system meets operating system, hardware, software, storage and memory requirement.

  • DB2 Setup Wizard: You can install DB2 using GUI, for this you need to have access to X Window System (X11)
  • Response file installation: In this method you can perform DB2 installation silently with preconfigured option, best suited for automating DB2 installation.
  • db2_install command: Interactive CLI based installation.
  • PayLoad deployment: It is advance installation method which is not recommended for most users. In this method post installation, you need to manual configured DB2 installation.

It is recommended to perform DB2 installation with root privilege for enterprise setup. DB2 can be installed with normal user as well.

If you want to install DB2 in default directory you can type yes or to install in different directory type no.

DB2 pureScale feature enable Active Active cluster but for that there is additional hardware and software requirement, which you should ensure during requirement check phase.

This will start your DB2 installation. DB2 installation should complete within 5 to 10 mins. If your system meet DB2 installation requirement and prerequisite check was successful then DB2 installation will complete successfully. At the end of installation you will get installation log file name which you can be referred for detailed DB2 installation logs.

If you liked this blog and interested in knowing more about DB2, please subscribe by clicking on Subscribe to ChoudharySumit.com by Email .

Источник

Оцените статью
Adblock
detector