File: 81.html

package info (click to toggle)
sqlrelay 1%3A0.37.1-3.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 13,084 kB
  • ctags: 6,691
  • sloc: cpp: 48,136; python: 10,118; ansic: 9,673; java: 9,195; php: 8,839; perl: 8,827; sh: 8,554; ruby: 8,516; tcl: 5,039; makefile: 3,665
file content (257 lines) | stat: -rw-r--r-- 9,500 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
<html>

<head>
<title>SQL Relay - Getting Started With IBM DB2 - Installing DB2 Version 8.1</title>
<link rel="stylesheet" href="../../css/styles.css">
</head>

<body>

<span class="heading1">Installing IBM DB2 Version 8.1</span><br>

<br><br>

<span class="heading2">Java Installation</span><br>

<p>The DB2 distribution comes with an RPM of the IBM Java SDK version 1.3.1.
You can install it from the db2/linux/Java-1.3 directory of the distribution
using rpm -i.  It will install java into /opt/IBMJava2-131, so make sure to
add /opt/IBMJava2-131/bin to your PATH environment variable if you want to
use it.</p>

<p>If you already have a different version of Java installed, it may or may
not work properly.</p>

<p>If you are running a kernel with Native Posix Threading Library support
(such as on Redhat 9) and if you try to use a version of Sun's JRE or JDK older
than version 1.3.1_09, you will need to run the following command first:</p>

<blockquote>
<b>export LD_ASSUME_KERNEL=2.4.1</b>
</blockquote>

<p>Note that Sun's JRE/JDK 1.3.1_09 and newer releases in the 1.3 series do not
require this setting, but do not work either.  I have been able to get Sun's
JRE/JDK 1.4.2_04 to work and it does not require the setting.</p>

<span class="heading2">DB2 Installation</span><br>

<p>IBM DB2 V8.1 is available from
<a href="http://www-3.ibm.com/software/data/db2/linux/">the IBM website</a> as
a tarball.  Extracting the tarball using <i>tar xf</i> creates a directory
called 009_ESE_LNX_32_NLV.  Change directories into that directory.</p>

<p>On Debian Linux and Slackware Linux, edit the db2/linux/db2_install script
and modify the line:</p>

<blockquote>
<b>rpm -ivh  ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1 \</b>
</blockquote>

<p>to read</p>

<blockquote>
<b>rpm -ivh --nodeps ${INSTDEV?}/${pkg?}${RPMEXTN?} 2>&1 \</b>
</blockquote>

<p>Run the db2_install script.</p>

<p>When prompted to specify a keyword, type DB2.ESE and press return.</p>

<p>When the script completes, run <i>rpm -qa</i> and verify that the following 
RPM's were installed:</p>

<blockquote><b>
IBM_db2icw81-8.1.0-0<br>
IBM_db2repl81-8.1.0-0<br>
IBM_db2dwcm81-8.1.0-0<br>
IBM_db2dj81-8.1.0-0<br>
IBM_db2icc81-8.1.0-0<br>
IBM_db2icuc81-8.1.0-0<br>
IBM_db2xmls81-8.1.0-0<br>
IBM_db2jdbc81-8.1.0-0<br>
IBM_db2djx81-8.1.0-0<br>
IBM_db2msen81-8.1.0-0<br>
IBM_db2conv81-8.1.0-0<br>
IBM_db2icut81-8.1.0-0<br>
IBM_db2chen81-8.1.0-0<br>
IBM_db2cj81-8.1.0-0<br>
IBM_db2inst81-8.1.0-0<br>
IBM_db2ca81-8.1.0-0<br>
IBM_db2crte81-8.1.0-0<br>
IBM_db2smpl81-8.1.0-0<br>
IBM_db2essg81-8.1.0-0<br>
IBM_db2cliv81-8.1.0-0<br>
IBM_db2secl81-8.1.0-0<br>
IBM_db2jhen81-8.1.0-0<br>
IBM_db2adt81-8.1.0-0<br>
IBM_db2dc81-8.1.0-0<br>
IBM_db2wbdb81-8.1.0-0<br>
IBM_db2conn81-8.1.0-0<br>
IBM_db2engn81-8.1.0-0<br>
IBM_db2pext81-8.1.0-0<br>
IBM_db2icms81-8.1.0-0<br>
IBM_db2sesm81-8.1.0-0<br>
IBM_db2adts81-8.1.0-0<br>
IBM_db2xml81-8.1.0-0<br>
IBM_db2rte81-8.1.0-0<br>
IBM_db2inx81-8.1.0-0<br>
IBM_db2cucs81-8.1.0-0<br>
IBM_db2sp81-8.1.0-0<br>
IBM_db2fs81-8.1.0-0<br>
IBM_db2das81-8.1.0-0<br>
IBM_db2cc81-8.1.0-0<br>
</b></blockquote>

<span class="heading2">Creating an Instance</span><br>

<p>A DB2 installation consists of an administration server and one or more
instances.  Each instance contains one or more databases.  The administration 
server coordinates the instances.  The administration server is owned by an 
OS-level user.  Each instance is owned by a seperate OS-level user as well.</p>

<p>To create an instance and an administration server, run 
<i>/opt/IBM/db2/V8.1/instance/db2isetup</i>, a java-based installation
program.</p>

<blockquote>
<p>On the screen titled <b>Welcome to the DB2 Instance Setup wizard</b>,
click Next</p>

<p>On the screen titled <b>Set user information for the DB2 Administration
Server</b>,
leave the defaults, enter a password into the Password and Confirm Password
text boxes and click Next</p>

<p>On the screen titled <b>Set up a DB2 instance</b>,
leave the default radio button checked (Create a DB2 instance)
and click Next</p>

<p>On the screen titled <b>Select how the instance will be used</b>,
leave the default radio button checked (Single-partition instance)
and click Next</p>

<p>On the screen titled <b>Set user information for the DB2 instance owner</b>,
leave the defaults, enter a password into the Password and Confirm Password
text boxes and click Next</p>

<p>On the screen titled <b>Set user information for the DB2 fenced user</b>,
leave the defaults, enter a password into the Password and Confirm Password
text boxes and click Next</p>

<p>On the screen titled <b>Configure DB2 instance TCP/IP communication</b>,
leave the default radio button checked (Configure),
leave the default Service name and Port number and click Next</p>

<p>On the screen titled <b>Set instance properties</b>,
leave the default Authentication type pulldown (Server),
leave the default Startup box checked
(Autostart the instance at system startup) and click Next</p>

<p>On the screen titled <b>Prepare the DB2 tools catalog</b>,
click the radio button next to "Use a local database" and click Next</p>

<p>On the screen titled <b>Specify a local database to store the DB2 tools
catalog</b>, leave the defaults then click Next</p>

<p>On the screen titled <b>Set up the administration contact list</b>,
leave the defaults and click Next.  (You may have to check and then uncheck the  "Enable notification" button before Next is enabled)</p>

<p>A dialog will come up with a warning about not being able to send
notifications until the smtp server has been specified. Click OK.</p>

<p>On the screen titled <b>Specify a contact for health monitor
notification</b>, enter your Name and Email address and click Next.</p>

<p>On the screen titled <b>Set up Informix data source support</b>,
click the check box next to "Defer this task until after installation is
complete" and click Next.</p>

<p>On the screen titled <b>Start copying files</b>, click Finish.</p>

<p>A progress dialog will come up.  When the process is finished, it will
go away.</p>

<p>On the screen titled <b>Setup is complete</b>, click Finish.</p>
</blockquote>

<p>Should you need to create additional DB2 instances, follow this procedure 
again using a different user name and skipping the steps pertaining
to the Administration Server.  The <i>/opt/IBM/db2/V8.1/instance/db2ilist</i> 
command lists all of the DB2 instances on the local computer.</p>

<p>If you need to drop an instance, run 
<i>/opt/IBM/db2/V8.1/instance/db2idrop instancename</i>, substituting the name
of the instance you want to drop for instancename.</p>

<p>The <i>/opt/IBM/db2/V8.1/instance/daslist</i> command lists all of the DB2 
administration servers on the local computer.</p>

<p>If you need to drop an administration server, run 
<i>/opt/IBM/db2/V8.1/instance/dasdrop servername</i>, substituting the name of
the administration server you want to drop for servername.</p>

<span class="heading2">Starting the Database at Boot Time</span><br>

<p>You can use the following script to start/stop the database at 
boot/shutdown time.</p>

<blockquote>
<PRE>
<FONT color=#0000ff>#!/bin/sh</FONT>

<B><FONT color=#a62828>case</FONT></B> &quot;$1&quot; <B><FONT color=#a62828>in</FONT></B>
        start<B><FONT color=#a62828>)</FONT></B>
                /opt/IBM/db2/V8.1/instance/db2istrt
        <B><FONT color=#a62828>;;</FONT></B>
        stop<B><FONT color=#a62828>)</FONT></B>
                /opt/IBM/db2/V8.1/instance/db2ishut
        <B><FONT color=#a62828>;;</FONT></B>
        *<B><FONT color=#a62828>)</FONT></B>
        <B><FONT color=#a62828>echo</FONT></B><FONT color=#ff00ff> $</FONT><B><FONT color=#a62828>&quot;</FONT></B><FONT color=#ff00ff>Usage: </FONT><FONT color=#a620f7>$0</FONT><FONT color=#ff00ff> {start|stop}</FONT><B><FONT color=#a62828>&quot;</FONT></B>
        <B><FONT color=#a62828>exit</FONT></B> <FONT color=#ff00ff>1</FONT>
<B><FONT color=#a62828>esac</FONT></B>

<B><FONT color=#a62828>exit</FONT></B> <FONT color=#ff00ff>0</FONT>
</PRE>
</blockquote>

<p>Install this script and run it with the "start" option to start up the
database.  Running it with the "stop" option shuts the database down.  To
access a database, it must be running.</p>

<p>This script will start the Administration Server.  During instance
configuration, there's a check box indicating whether the instance will be
configured to start at boot time.  If you didn't check it, to get each instance
to start at boot time, you need to run the following command as root for each
instance.</p>

<blockquote>
<b>/opt/IBM/db2/V8.1/instance/db2iauto -on INSTANCE_USER</b>
</blockquote>

<p>Where INSTANCE_USER is replaced by the username of the user associated with
the instance you want to start at boot time.</p>

<p>If you want to disable instances from starting at boot time, you need to
run the following command as root for each instance:</p>

<blockquote>
<b>/opt/IBM/db2/V8.1/instance/db2iauto -off INSTANCE_USER</b>
</blockquote>

<span class="heading2">Making the Libraries Available</span><br>

<p>The DB2 client libraries should be installed in /opt/IBM/db2/V8.1/lib.
DB2 client programs (including SQL Relay) need to be able to access these
libraries at runtime.  The dynamic loader searches for libraries in /lib,
/usr/lib and in directories specified in /etc/ld.so.conf.  Append the following
line to /etc/ld.so.conf and run /sbin/ldconfig (as root).</p>

<blockquote><b>
/opt/IBM/db2/V8.1/lib
</b></blockquote>

</body>

</html>