First, why to install offline
No net, working in a bank, server environment configuration, completely offline (originally five minutes to fix things, do not have to engage in a day.) My clothes!! )
Second. Installation Steps
1. Download the ibm_db module, https://pypi.python.org/pypi/ibm_db.
2. Download the driver module of DB2 Two, one can find the download link in the setup.py of the ibm_db module, download the specified driver according to the version of the system. such as https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz
Subject to availability.
3. A download DB2 of the client package, the official website download http://www-01.ibm.com/support/docview.wss?rs=4020&uid=swg21385217 English is better, a look will understand, The first driver to compare all the files. You can download it. For example ibm_data_server_driver_package_linuxx64_v11.1.tar.gz the directory after decompression is dsdriver. Then execute inside the executable file Installdsdriver, will soon install successfully, then add the following to/etc/profile remember source.
. /installation directory/dsdriver/db2profile
Third. Installing the ibm_db module
1. Unzip the ibm_db module, if the extracted directory ibm_db2.
2. Then unzip the DB2 driver module, extract it will be a clidriver directory, copied to the IBM_DB2 directory.
3. Enter the IBM_DB2 directory, execute the python setup.py install, and if you are prompted for GCC error, please yum or apt-get the Linux system library files such as GCC.
4. Enter the Python compiler, import: Imports ibm_db no error, both success.
Online installation on the TM is too easy, direct pip install ibm_db can *******
This article is from the "people on the Run" blog, please be sure to keep this source http://leizhu.blog.51cto.com/3758740/1874823
Offline installation of DB2 Python module ibm_db