Recently, some projects use the IBM DB2 database in Linux, which is not as easy to understand as MySQL. It may be that the DB2 database is more commercialized and is not as open-source as MySQL.
Recently, some projects use the IBM DB2 database in Linux, which is not as easy to understand as MySQL. It may be that the DB2 database is more commercialized and is not as open-source as MySQL.
Preface:
Recently, some projects use the IBM DB2 database in Linux, which is not as easy to understand as MySQL. It may be that the DB2 database is more commercialized and is not as open-source as MySQL, the related DB2 resources are not as popular as MySQL on the Internet, and they are not as smooth as MySQL when learning DB2.
Below is a simple record of study notes. The Linux system I use is the RedHat Enterprise Edition (Red Hat Enterprise Linux 5), which is a DB2 database installed on a virtual machine, it is mainly used for learning. If you really need to pay for commercial DB2 databases.
Related reading:
Notes for learning DB2 commands in Linux
Steps for detaching A DB2 database in Linux
Install the DB2 database in Linux:
1. Download The db2data warehouse Software Package db2exc_9720.lnx_x86.tar.gz (Note: official free version)
Linux for System x86 V9.7.5 317 MB
DB2 Express-C free Database Server
Db2exc_971_LNX_x86.tar.gz (404 MB)
Data Studio (independent) Management Utility
Ibm_data_studio_standalone_linux.tar.gz (208 MB)
Local Language Pack for DB2 9.7.1
Db2exc_nlpack_971_LNX_x86.tar.gz (317 MB)
NOTE: For the first login, you must register a user before downloading it.
2. decompress the tar-zxvf db2 package (in the opt directory)
Note: Switch the installation to the root user
[Root @ localhost DB2] # pwd
/Mnt/hgfs/Sunrier/DB2
[Root @ localhost DB2] # ls
Db2exc_971_LNX_x86.tar.gz
[Root @ localhost DB2] # cd/opt
[Root @ localhost opt] # ls
[Root @ localhost opt] # tar-zxvf/mnt/hgfs/Sunrier/DB2/db2exc_971_LNX_x86.tar.gz
........................................ ......................................
........................................ ......................................
........................................ ......................................
........................................ ......................................
........................................ ......................................
........................................ ......................................
Expc/db2_deinstall
Expc/readmefirst.htm
Expc/db2setup
Expc/db2ls
Expc/db2ckupgrade
Expc/db2_install
Expc/readmefirst.txt
Expc/installFixPack
[Root @ localhost opt] # ls
Expc
[Root @ localhost opt] #
3. Start to install the software package
[Root @ localhost opt] # ls
Expc
[Root @ localhost opt] # cd expc
[Root @ localhost expc] # ls
Db2 db2_deinstall db2ls db2setup installFixPack readmefirst.htm
Db2ckupgrade db2_install db2prereqcheck doc readmefirst readmefirst.txt
[Root @ localhost expc] #./db2_install
Default directory used to install the product-/opt/ibm/db2/V9.7
**************************************** *******************
Do you want to select another directory for installation? [Yes/No]
No
Initializing DB2 installation.
The total number of tasks to be executed is: 35
The total estimated time for all tasks to be executed is: 1149
Task #1 start
Description: The license agreement is being checked.
Estimated time: 1 second
Task #1 ends
Task #2 start
Description: basic client support for installation with root user privileges
Estimated time: 3 seconds
Task #2 ends
********************
********************
********************
********************
********************
********************
********************
********************
********************
********************
********************
********************
********************
********************
********************
********************
Task #34 start
Description: The DB2 Update Service is being registered.
Estimated time: 30 seconds
Task #34 ended
Task #35 start
Description: Updating the global profile registry.
Estimated time: 3 seconds
Task #35 ends
The execution has been completed successfully.
For more information, see the DB2 Installation Log On "/tmp/db2_install.log.24239.
[Root @ localhost opt] # ls
Expc IBM
[Root @ localhost opt] #
4. Register license
[Root @ localhost opt] # cd ibm/db2/V9.7/adm
[Root @ localhost adm] # pwd
/Opt/ibm/db2/V9.7/adm
[Root @ localhost adm] # ls
Cieadmsv cieprcnt db2audit db2chparm db2fmp db2genp db2govlg db2inidb db2path db2rfpen db2set db2stop db2sysc
Ciecsdem cieprisc db2cacpy db2dart db2fmip db2gov db2havend db2licd db2pd db2rstar db2star2 db2stop2 db2syscr
Cielock cieprupx db2cap db2dasstml db2fmpterm db2govd db2iclean db2licm db2pdcfg db2rstop db2start db2stst db2trc
[Root @ localhost adm] #/opt/ibm/db2/V9.7/adm/db2licm-a/opt/expc/db2/license/db2expc_uw.lic
LIC1402I License added successfully.
LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE
AGREEMENT, located in the following directory: "/opt/ibm/db2/V9.7/license/zh_CN.utf8"
[Root @ localhost adm] #
,