On Linux® and UNIX operating systems, you install
the
IBM Data Server Driver Package software by issuing the installDSDriver command.
You can use the
IBM Data Server Driver Package software for application
distribution in mass deployment scenarios.
About this task
The IBM Data Server Driver package includes driver
package includes database drivers for Java™,
ODBC/CLI, PHP, Python, and Ruby on Rails, each of which
is stored in its own subdirectory. The Java and
ODBC/CLI drivers are compressed. Locations of drivers in
the extracted
IBM Data Server Driver Package software are:
- Java
- Path: jdbc_sqlj_driver/platform
- File name: db2_db2driver_for_jdbc_sqlj.zip
- ODBC/CLI
- Path: odbc_cli_driver/platform
- File name: ibm_data_server_driver_for_odbc_cli.tar.Z
- PHP
- Path: php_driver/platform/php32 or
php_driver/platform/php64
- Files: ibm_db2_n.n.n.so, ibm_db2_n.n.n.so, pdo_ibm_n.n.n.so, where n represents
the version of the extension.
- Prerequisite: The PHP driver requires the ODBC/CLI driver to be installed.
- Python
- Path: python32 for a
32-bit driver or python64 for a 64-bit driver.
- Files: ibm_db2-n.n.n-pyn.n-platform-n.n.egg, ibm_db2_django-n.n.n-pyn.n.egg, ibm_db2_sa-n.n.n-pyn.n.egg where n represents
the version of the extension.
- Prerequisite: The Python driver requires the ODBC/CLI driver
to be installed.
- Ruby on Rails
- Path: ruby_driver/platform/ruby32 for
32-bit driver or ruby_driver/platform/ruby64 for
64-bit driver.
- File: ibm_db-n.n.n.gem
- Prerequisite: The Ruby on Rails driver requires the ODBC/CLI driver to be installed.
- To install the Ruby on Rails driver, from the location of the
gem file, run the following command: gem install
ibm_db-X.XX.X.gem.
Procedure
To install the
IBM Data Server Driver Package software:
- Copy the
IBM Data Server Driver Package software archive onto the target machine.
- Extract the
IBM Data Server Driver Package archive.
- To extract
the Java and ODBC/CLI driver, issue the installDSDriver command
from the root installation path. The installDSDriver command
creates the db2profile and db2cshrc script
files. In a 64-bit environment, the installDSDriver command
creates the db2profile32, db2cshrc32, db2profile,
and db2cshrc script files.
- If you have an existing
IBM Data Server Driver Package installation, you can upgrade the
IBM Data Server Driver Package software to a more recent fix pack version by issuing
the installDSDriver -upgrade <existing _dsdriver_path> command.
The <existing _dsdriver_path> parameter specifies
the path of the existing
IBM Data Server Driver Package software installation.
- To set the IBM data
server driver environment within the 64-bit installation of the
IBM Data Server Driver Package software, run the following script files based
on your operating system environment:
- In the 64-bit Bash or Korn shell environment, run the db2profile file.
- In the 32-bit Bash or Korn shell environment, run the db2profile32 file.
- In the 64-bit C shell environment, source the db2cshrc file.
- In the 32-bit C shell environment, source the db2cshrc32 file.
For the 32-bit installation of the
IBM Data Server Driver Package software:
- Run the db2profile file for the 32-bit
Bash or Korn shell environment.
- Source the db2cshrc file for the 32-bit
C shell environment.
- Optional:
Bind the db2cli.lst list file by using the db2cli
-bind command. See db2cli - DB2® interactive CLI command.
- Optional: To install open source
drivers:
- Optional: To install the Node.js
driver, see Installing the node-ibm_db
driver on Linux and UNIX systems.
- Optional: To install the Perl driver, see Programming considerations
for Perl.
- Optional: To install the PHP driver, see Setting up the PHP
environment on Linux or UNIX.
- Optional: To install the Python driver,
see Setting up the Python
environment for IBM data servers.
- Optional: To install the Ruby on Rails driver,
see Installing the IBM_DB
adapter and driver as a Ruby gem.
- Optional: Remove the
IBM Data Server Driver Package archive file.
What to do next
- After installing the
IBM Data Server Driver Package software, you can optionally create and populate
the configuration file, db2dsdriver.cfg, with
database information required for connectivity. You can use the contents
of the db2dsdriver.cfg.sample file to create
the db2dsdriver.cfg file.
- Validate the db2dsdriver.cfg file.
- (Optional) Configure the unixODBC driver manager. The unixODBC
driver manager is not shipped with the
IBM Data Server Driver Package software and the unixODBC driver manager must
be obtained separately.
- Test the database connectivity.