Manually install DB2 on Linux
1.Run the. /db2_install to install the necessary files
2.Run as the root user, set up three groups respectively corresponding to three DB2 users: the instance owner,The fenced user, the DAS user, the command is as follows:
groupadd -g 999 db2iadm1
groupadd -g 998 db2fadm1
groupadd -g 997 db2asgrp
3.Run as root, the establishment of three DB2 users, and specify the three user directory, generally for/opt, the command is as follows:
useradd -u 1004 -g db2iadm1 -m -d /db2home/db2inst1 db2inst1 -p passwd
useradd -u 1003 -g db2fadm1 -m -d /db2home/db2fenc1 db2fenc1 -p passwd
useradd -u 1002 -g db2asgrp -m -d /db2home/dasusr1 dasusr1 -p passwd
4. Run as root, to three users set password, the command is as follows:
passwd db2inst1
passwd db2fenc1
passwd dasusr1
5. Create a DB2 instance. Using the db2icrt command:
A. run as root
B. Enter the following command:
/ opt/ibmdb2 / V10.1 / instance/db2icrt -u [- a AuthType] FencedID InstNme
Among them:
Instance – AuthType said the type of authentication, the default for the SERVER, other
Types including CLIENT, DCS, SERVER_ENCRYPT, or DCS_ENCRYPT.
– FencedID is the name of the DB2 fenced user.
– InstNme is the instance name.
Sample is as follows:
/opt/ibm/db2/V10.1/instance/db2icrt -u db2fenc1 db2inst1
Problems:
DBI1446I The db2icrt command is running, please wait.
DB2 installation is being initialized.
The host name “framework” is invalid. Specify a valid host name.
A major error occurred during the execution that caused this program to
terminate prematurely. If the problem persists, contact your technical service
representative.
For more information see the DB2 installation log at “/tmp/db2icrt.log.2110”.
DBI1264E Errors were encountered in running db2icrt. Please
refer to the installation log file /tmp/db2icrt.log.2110 for more
information.
Explanation:
All processed and failed operations have been saved into this log file.
User response:
Do not modify this file in any way. This file is for IBM Technical
Support reference.
Problem(Abstract)
The “DBI1922N The host name is not valid” can be received when trying to manually create a DB2 instance or via the upgrade wizard
Cause
The /etc/hosts file is not correctly coded.
Resolving the problem
To resolve this issue, you need to make sure that the /etc/hosts file is coded correctly as stated in the installation manual. Information on the hosts file is also available online in the Tivoli Storage Manager Information Center under the Configuring the /etc/hosts file on AIX®, HP-UX, Linux, and Solaris systems section.
Once the hosts has been corrected, it is necessary the run the db2icrt command manually. Specifically:
/opt/tivoli/tsm/db2/instance/db2icrt -a SERVER -u instance_name instance_name
If the db2icrt command indicates the “sqllib” directory already exists, rename the directory and rerun the db2icrt command again.
Once the db2icrt command completes successfully, continue with the manual configuration steps or rerun dsmupgdx if using the graphical upgrade wizard.
1. modify hostname in below file:
/etc/sysconfig/network
/etc/hosts
2. restart service:
service NetworkManager restart
service network restart
6. To create a DB2 instance TCP/IP connection
A. Update the/etc/services file, specify the DB2 server to monitor the client requested service name and port
Add the line to/etc/services
db2c_db2inst1 50001/tcp # DB2 connection service port
Among them:
• db2c_db2inst1 is connection service name
• 50001 is the service port
• TCP/IP is protocol TCP
The service name and port number must be in the system is the only one.
B. in the server to update the database manager configuration file:
I. to DB2 instance user login.
Ii. Set the DB2 instance environment( this step can ignore):
INSTHOME/sqllib/the db2profile
以下文章点击率最高
Loading…