Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1293 dpurdie 1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2
<HTML
3
><HEAD
4
><TITLE
5
>Installation</TITLE
6
><META
7
NAME="GENERATOR"
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9
REL="HOME"
10
TITLE="The Codestriker Guide"
11
HREF="book1.html"><LINK
12
REL="PREVIOUS"
13
TITLE="We Want to Hear from You!"
14
HREF="x44.html"><LINK
15
REL="NEXT"
16
TITLE="Configuration"
17
HREF="x107.html"></HEAD
18
><BODY
19
CLASS="CHAPTER"
20
BGCOLOR="#FFFFFF"
21
TEXT="#000000"
22
LINK="#0000FF"
23
VLINK="#840084"
24
ALINK="#0000FF"
25
><DIV
26
CLASS="NAVHEADER"
27
><TABLE
28
SUMMARY="Header navigation table"
29
WIDTH="100%"
30
BORDER="0"
31
CELLPADDING="0"
32
CELLSPACING="0"
33
><TR
34
><TH
35
COLSPAN="3"
36
ALIGN="center"
37
>The Codestriker Guide: Version 1.9.3</TH
38
></TR
39
><TR
40
><TD
41
WIDTH="10%"
42
ALIGN="left"
43
VALIGN="bottom"
44
><A
45
HREF="x44.html"
46
ACCESSKEY="P"
47
>Prev</A
48
></TD
49
><TD
50
WIDTH="80%"
51
ALIGN="center"
52
VALIGN="bottom"
53
></TD
54
><TD
55
WIDTH="10%"
56
ALIGN="right"
57
VALIGN="bottom"
58
><A
59
HREF="x107.html"
60
ACCESSKEY="N"
61
>Next</A
62
></TD
63
></TR
64
></TABLE
65
><HR
66
ALIGN="LEFT"
67
WIDTH="100%"></DIV
68
><DIV
69
CLASS="CHAPTER"
70
><H1
71
><A
72
NAME="AEN49"
73
></A
74
>Chapter 2. Installation</H1
75
><DIV
76
CLASS="TOC"
77
><DL
78
><DT
79
><B
80
>Table of Contents</B
81
></DT
82
><DT
83
>2.1. <A
84
HREF="c49.html#CODESTRIKER-DATABASE-CREATION"
85
>Codestriker database creation</A
86
></DT
87
><DT
88
>2.2. <A
89
HREF="x107.html"
90
>Configuration</A
91
></DT
92
><DT
93
>2.3. <A
94
HREF="x234.html"
95
>Running install.pl</A
96
></DT
97
><DT
98
>2.4. <A
99
HREF="x248.html"
100
>Apache webserver configuration</A
101
></DT
102
><DT
103
>2.5. <A
104
HREF="x302.html"
105
>IIS configuration</A
106
></DT
107
><DT
108
>2.6. <A
109
HREF="x326.html"
110
>Upgrading Codestriker</A
111
></DT
112
></DL
113
></DIV
114
><P
115
>      This chapter is concerned with installing Codestriker on your
116
      system.  This requires the following steps:
117
      <P
118
></P
119
><UL
120
><LI
121
><P
122
>creating the Codestriker database;</P
123
></LI
124
><LI
125
><P
126
>configuring the webserver; and</P
127
></LI
128
><LI
129
><P
130
>unpacking and configuring Codestriker.</P
131
></LI
132
></UL
133
>
134
    </P
135
><DIV
136
CLASS="SECT1"
137
><H1
138
CLASS="SECT1"
139
><A
140
NAME="CODESTRIKER-DATABASE-CREATION"
141
>2.1. Codestriker database creation</A
142
></H1
143
><P
144
>        Codestriker stores all code review topics and comments into a
145
        relational database.  Currently,
146
	<A
147
HREF="http://www.mysql.com"
148
TARGET="_top"
149
>MySQL</A
150
>,
151
	<A
152
HREF="http://www.postgresql.org"
153
TARGET="_top"
154
>PostgreSQL</A
155
>,
156
	Oracle and SQL Server are
157
        supported, but any database system can be used, provided it has
158
        an implementation of Perl's DBI interface, which is the case
159
	for all major database implementations.
160
      </P
161
><DIV
162
CLASS="SECT2"
163
><H2
164
CLASS="SECT2"
165
><A
166
NAME="AEN64"
167
>2.1.1. Using MySQL</A
168
></H2
169
><P
170
>	  MySQL can be used on either UNIX or Window platforms.  It is
171
	  available for download from
172
	  <A
173
HREF="http://www.mysql.com"
174
TARGET="_top"
175
>http://www.mysql.com</A
176
>.
177
          Make sure you use at least version 4.1 or above, as this
178
          supports UTF8 databases.
179
	  <SPAN
180
CLASS="emphasis"
181
><I
182
CLASS="EMPHASIS"
183
>Note under Solaris, it seems at
184
	  the time of writing that only the 32-bit version of Perl and
185
	  MySQL (and DBD::mysql) can be used, the 64-bit versions
186
	  don't work.</I
187
></SPAN
188
>
189
	  For Linux RedHat distributions, the necessary packages
190
	  required are mysql, mysql-devel, mysql-server, which may or
191
	  may not already be present on your system.  Depending on
192
	  your UNIX operating system, starting mysql will be something
193
	  like the following:
194
	  <PRE
195
CLASS="PROGRAMLISTING"
196
>/etc/rc.d/init.d/mysql start
197
          </PRE
198
>
199
	  For Windows, there will typically be a desktop icon or menu
200
	  shortcut for starting mysqld.
201
	</P
202
><P
203
>	  Once mysql is running, it is necessary to create the
204
	  Codestriker database and create the codestriker user.  Under
205
	  UNIX, a command like the following will be required:
206
	  <PRE
207
CLASS="PROGRAMLISTING"
208
>% mysql -u root mysql
209
          </PRE
210
>
211
          For Windows, there should be a shortcut available for
212
          getting a mysql prompt.
213
	</P
214
><P
215
>	  At the mysql prompt, issue the following command, but
216
	  substitute a suitable database password instead of cspasswd
217
	  as shown here.
218
	  <PRE
219
CLASS="PROGRAMLISTING"
220
>CREATE DATABASE codestrikerdb CHARACTER SET utf8;
221
 
222
GRANT SELECT,INSERT,UPDATE,DELETE,INDEX,ALTER,CREATE,DROP,REFERENCES
223
 ON codestrikerdb.* TO codestriker@localhost IDENTIFIED BY 'cspasswd';
224
 
225
FLUSH PRIVILEGES;
226
 
227
QUIT
228
          </PRE
229
>
230
	 </P
231
><P
232
>	   You can check the Codestriker database at any time from the
233
	   command line, by issuing the following command, and
234
	   entering the database password:
235
	  <PRE
236
CLASS="PROGRAMLISTING"
237
>mysql -u codestriker -D codestrikerdb -p
238
          </PRE
239
>
240
	 </P
241
><P
242
>	   If required, the Codestriker database can be dropped, by
243
	   entering in the following command at the mysql command
244
	   prompt as user root:
245
	  <PRE
246
CLASS="PROGRAMLISTING"
247
>DROP DATABASE codestrikerdb;
248
          </PRE
249
>
250
	 </P
251
></DIV
252
><DIV
253
CLASS="SECT2"
254
><H2
255
CLASS="SECT2"
256
><A
257
NAME="AEN78"
258
>2.1.2. Using PostgreSQL</A
259
></H2
260
><P
261
>	  At the time of writing PostgreSQL was only available for
262
	  UNIX platforms, however it is quite possible by the time you
263
	  are reading this that a version for Windows will be available.
264
	  The project page for PostgreSQL is:
265
	  <A
266
HREF="http://www.postgresql.org"
267
TARGET="_top"
268
>http://www.postgresql.org</A
269
>.
270
	  For Linux RedHat distributions, the postgresql,
271
	  postgresql-server and postgresql-devel packages are
272
	  required.  Make sure you are using at least version 7.1, as
273
	  prior versions had restrictions on the size of "text"
274
	  fields, making it impractical for use with Codestriker.
275
	  PostgreSQL can be started with a command like:
276
	  <PRE
277
CLASS="PROGRAMLISTING"
278
>/etc/rc.d/init.d/postgresql start
279
          </PRE
280
>
281
	</P
282
><P
283
>	  To create the Codestriker database and user, enter the
284
	  following commands:
285
	  <PRE
286
CLASS="PROGRAMLISTING"
287
>% createuser --username=postgres -d -A codestriker
288
% createdb -E UTF8 --username=codestriker codestrikerdb
289
          </PRE
290
>
291
          If the last command claims UTF8 is an unknown encoding, try
292
          the value UNICODE.  If that still fails, you have a
293
          distribution which wasn't configured with
294
          --enable-multibyte.  Try downloading the latest version of
295
          PostgreSQL.
296
	</P
297
><P
298
>	  Make sure your <TT
299
CLASS="FILENAME"
300
>pg_hba.conf</TT
301
> file is
302
	  suitable configured, in particular for authentication.
303
	  This file is often located in
304
	  <TT
305
CLASS="FILENAME"
306
>/etc/postgres</TT
307
>.
308
	</P
309
><P
310
>	  You can check the Codestriker database interactively at any
311
	  time with the following command:
312
	  <PRE
313
CLASS="PROGRAMLISTING"
314
>% psql -U codestriker codestrikerdb
315
          </PRE
316
>
317
	</P
318
><P
319
>	   If required, the Codestriker database can be dropped, by
320
	   entering in the following command:
321
	  <PRE
322
CLASS="PROGRAMLISTING"
323
>% dropdb --username=codestriker codestrikerdb
324
          </PRE
325
>
326
	 </P
327
></DIV
328
><DIV
329
CLASS="SECT2"
330
><H2
331
CLASS="SECT2"
332
><A
333
NAME="AEN92"
334
>2.1.3. Using Oracle</A
335
></H2
336
><P
337
>	  Codestriker has been deployed under Linux 2.4 using
338
	  Oracle 8i.  If you have Oracle installed, you most likely
339
	  will have somebody that can easily create a new Codestriker
340
	  database for you.  Install the DBD::Oracle Perl module, and
341
          modify the <CODE
342
CLASS="VARNAME"
343
>$db</CODE
344
> variable in the
345
	  <TT
346
CLASS="FILENAME"
347
>codestriker.conf</TT
348
> file appropriately so
349
	  that Codestriker knows how to connect to its database.  An
350
	  example is given in the configuration file.  For more
351
	  advanced connection strings, please consult the DBD::Oracle
352
	  man page.
353
	</P
354
></DIV
355
><DIV
356
CLASS="SECT2"
357
><H2
358
CLASS="SECT2"
359
><A
360
NAME="AEN97"
361
>2.1.4. Using SQL Server</A
362
></H2
363
><P
364
>          Codestriker has been deployed using SQL Server on Win32, via
365
          the ODBC interface.  The first step is to create a
366
          "Codestriker" system data source, by going to "Control
367
          Panel" -&#62; "Administrative Tools" -&#62; "Data Sources (ODBC)".
368
          From here, select the "System DSN" tab, and click "Add".
369
          Select the driver named "SQL Server", then click "Finish".
370
          Enter in "Codestriker" for the name textfield, "Codestriker
371
          database" for the description textfield, and select the
372
          appropriate SQL Server from the server dropdown box, then
373
          click "Next".  Choose the authentication appropriate for
374
          your site, and work your way through the final configuration
375
          options.  Modify the <CODE
376
CLASS="VARNAME"
377
>$db</CODE
378
> variable in the
379
	  <TT
380
CLASS="FILENAME"
381
>codestriker.conf</TT
382
> file appropriately
383
	  (see the example) so that Codestriker knows how to connect
384
	  to this datasource.  For more advanced connection settings,
385
	  please consult the DBD::ODBC man page or online manual.
386
	</P
387
></DIV
388
><DIV
389
CLASS="SECT2"
390
><H2
391
CLASS="SECT2"
392
><A
393
NAME="AEN102"
394
>2.1.5. Other Databases</A
395
></H2
396
><P
397
>	  Codestriker uses the Perl DBI package, a portable API that
398
	  supports all the major database systems.  The database
399
	  creation code is abstracted so that it can work on a
400
	  diverse range of database systems.  Support for a new
401
	  database system involves writing a single Perl module in the
402
	  <TT
403
CLASS="FILENAME"
404
>Codestriker::DB</TT
405
> package and registering
406
	  it in the <TT
407
CLASS="FILENAME"
408
>Codestriker::DB::Database</TT
409
>
410
	  module.  There are a number of example database modules
411
	  there.
412
	</P
413
></DIV
414
></DIV
415
></DIV
416
><DIV
417
CLASS="NAVFOOTER"
418
><HR
419
ALIGN="LEFT"
420
WIDTH="100%"><TABLE
421
SUMMARY="Footer navigation table"
422
WIDTH="100%"
423
BORDER="0"
424
CELLPADDING="0"
425
CELLSPACING="0"
426
><TR
427
><TD
428
WIDTH="33%"
429
ALIGN="left"
430
VALIGN="top"
431
><A
432
HREF="x44.html"
433
ACCESSKEY="P"
434
>Prev</A
435
></TD
436
><TD
437
WIDTH="34%"
438
ALIGN="center"
439
VALIGN="top"
440
><A
441
HREF="book1.html"
442
ACCESSKEY="H"
443
>Home</A
444
></TD
445
><TD
446
WIDTH="33%"
447
ALIGN="right"
448
VALIGN="top"
449
><A
450
HREF="x107.html"
451
ACCESSKEY="N"
452
>Next</A
453
></TD
454
></TR
455
><TR
456
><TD
457
WIDTH="33%"
458
ALIGN="left"
459
VALIGN="top"
460
>We Want to Hear from You!</TD
461
><TD
462
WIDTH="34%"
463
ALIGN="center"
464
VALIGN="top"
465
>&nbsp;</TD
466
><TD
467
WIDTH="33%"
468
ALIGN="right"
469
VALIGN="top"
470
>Configuration</TD
471
></TR
472
></TABLE
473
></DIV
474
></BODY
475
></HTML
476
>