-
Notifications
You must be signed in to change notification settings - Fork 709
/
Installation.xml
638 lines (562 loc) · 19.8 KB
/
Installation.xml
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Admin_Guide.ent">
%BOOK_ENTITIES;
]>
<chapter id="admin.install">
<title>Installation</title>
<para>This chapter explains how to install or upgrade MantisBT.
</para>
<para>The table below contains a high-level overview of the processes.
Refer to the corresponding chapters for details.
</para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>New Installation</entry>
<entry>Upgrade</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<orderedlist>
<listitem><para>
<xref linkend="admin.install.prereq" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.preinstall" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.new" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.config" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.postcommon" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.postinstall" />
</para></listitem>
</orderedlist>
</entry>
<entry>
<orderedlist>
<listitem><para>
<xref linkend="admin.install.preinstall" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.backups" />
</para></listitem>
<listitem><para>
Put the site down for maintenance
</para></listitem>
<listitem><para>
<xref linkend="admin.install.upgrade" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.postcommon" />
</para></listitem>
<listitem><para>
<xref linkend="admin.install.postupgrade" />
</para></listitem>
</orderedlist>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<section id="admin.install.prereq">
<title>Prerequisites</title>
<itemizedlist>
<listitem>
<para>Install required software and ensure they are on
the correct version.
</para>
<para>Refer to
<xref linkend="admin.about.requirments" />
and
<xref linkend="admin.install.requirements" />
for further details.
</para>
<para>@TODO these 2 sections should be combined into one</para>
</listitem>
<listitem>
<para>PHP File extensions</para>
<para>MantisBT uses only <emphasis>.php</emphasis> files.
If your webserver is configured for other extensions
(e.g. .PHP3, .PHTML) then you will have to have the administrator
add support for .PHP files. This should be a trivial
modification. Further details can be found in the
<ulink url="http://www.php.net/manual/en/installation.php">PHP documentation</ulink>
</para>
</listitem>
</itemizedlist>
</section>
<section id="admin.install.preinstall">
<title>Pre-installation / upgrade tasks</title>
<para>These tasks cover the download and deployment of MantisBT, and
should be performed prior to any new installation or upgrade.
</para>
<orderedlist>
<listitem><para>
Download MantisBT (see <xref linkend="admin.about.download" />)
</para>
</listitem>
<listitem>
<para>Transfer the downloaded file to your webserver
</para>
<para>This can be done using whatever method you like best
(ftp, scp, etc). You will need to telnet/ssh into the
server machine for the next steps.
</para>
</listitem>
<listitem>
<para>Extract the release
</para>
<para>It is highly recommended to maintain a separate
directory for each release.
This not only avoids mismatch between versions,
(files may have been added or removed)
but also provides an easy path to downgrade your installation,
should you need to.
</para>
<para>
The usual command is (1 step):
<programlisting>tar -xzf <emphasis>filename.tar.gz</emphasis></programlisting>
OR (2 steps):
<programlisting>
gunzip <emphasis>filename.tar.gz</emphasis>
tar -xf <emphasis>filename.tar</emphasis>
</programlisting>
Other file archiving tools such as
<ulink url="http://www.7-zip.org/">7-Zip</ulink>
should also be able to handle decompression of the archive.
</para>
<para>The extraction process should create a new directory like
<emphasis>mantisbt-1.2.x</emphasis>
</para>
</listitem>
<listitem>
<para>Rename the directory
</para>
<para>For new installations, you may want to rename the
directory just created to something simpler, e.g.
<emphasis>mantisbt</emphasis>
<programlisting>mv mantisbt-1.2.x mantisbt</programlisting>
</para>
</listitem>
</orderedlist>
</section>
<section id="admin.install.new">
<title>New Installation</title>
<para>This chapter explains how to perform a new installation of
MantisBT.
</para>
<para>Start by Performing the steps described in
<xref linkend="admin.install.preinstall" />
above.
</para>
<para>Once that is done, execute the installation script.
From your web browser, access
<programlisting>http://yoursite/mantisbt/admin/install.php</programlisting>
The installation procedure will go through the following steps:
</para>
<orderedlist>
<listitem>
<para>The script checks basic parameters for the web server
</para>
</listitem>
<listitem>
<para>Provide required information for the installation</para>
<itemizedlist>
<listitem><para>database type</para></listitem>
<listitem><para>database server hostname</para></listitem>
<listitem>
<para>user and password</para>
<para>Required privileges:
SELECT, INSERT, UPDATE, and DELETE
</para>
</listitem>
<listitem>
<para>high-privileged database account</para>
<para>Additional privileges required:
INDEX, CREATE, ALTER, and DROP
</para>
<para>If this account is not specified, the database
user will be used.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Click the <emphasis>Install/Upgrade Database</emphasis>
button
</para>
</listitem>
<listitem>
<para>The script creates the database and tables.
</para>
<para>The default Administrator user account is created
at this stage, to allow the initial login
and setup of MantisBT.
</para>
</listitem>
<listitem>
<para>The script attempts to write a basic
<emphasis>config_inc.php</emphasis>
file to define the database connection parameters.
</para>
<para>This operation may fail if the web server's user account
does not have write permissions to the directory
(which is recommended for obvious security reasons).
In this case, you will have to manually create the
file and copy/paste the contents from the page.
</para>
</listitem>
<listitem>
<para>The script perform post installation checks on the system.
</para>
<para>Review and correct any errors.
</para>
</listitem>
</orderedlist>
</section>
<section id="admin.install.upgrade">
<title>Upgrading</title>
<para>This chapter explains how to upgrade an existing
MantisBT installation.
</para>
<para>Start by Performing the steps described in
<xref linkend="admin.install.preinstall" />
above.
</para>
<orderedlist>
<listitem>
<para>Put the site down for maintenance
<programlisting>cp mantis_offline.php.sample mantis_offline.php
</programlisting>
This will prevent users from using the system while
the upgrade is in progress.
</para>
</listitem>
<listitem>
<para>Always <emphasis>Backup your code, data and
config files</emphasis> before upgrading !
</para>
<para>This includes your Mantis directory, your attachments,
and your database. Refer to
<xref linkend="admin.install.backups" />
for details.
</para>
</listitem>
<listitem>
<para>Copy the configuration files
</para>
<para>To preserve your system settings, you should copy the
files listed below to the new directory, as well as any other
custom files such as logo, favicon, css, etc.
</para>
<para><emphasis>
config_inc.php
custom_strings_inc.php
custom_constants_inc.php
custom_functions_inc.php
</emphasis>
</para>
</listitem>
<listitem>
<para>Execute the upgrade script.
From your web browser, access
<programlisting>http://yoursite/mantisbt-NEW/admin/install.php</programlisting>
where <emphasis>mantisbt-NEW</emphasis> is the name of the
directory where the new release was extracted
</para>
</listitem>
<listitem>
<para>Provide required information for the upgrade</para>
<itemizedlist>
<listitem>
<para>high-privileged database account</para>
<para>Additional privileges required:
INDEX, CREATE, ALTER, and DROP
</para>
<para>If this account is not specified, the database
user will be used.
</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para>Click the <emphasis>Install/Upgrade Database</emphasis>
button
</para>
</listitem>
<listitem>
<para>At the end of the upgrade, review and correct any
warnings or errors.
</para>
</listitem>
</orderedlist>
</section>
<section id="admin.install.config">
<title>Configure your installation</title>
<para>There are many settings that you can adjust to configure
and customize MantisBT.
Refer to <xref linkend="admin.config" />, as well as the
<emphasis>config_default_inc.php</emphasis> file
for in depth explanations of the available options.
Check out also
<xref linkend="admin.customize" />
for further options to personalize your installation.
</para>
<para>This step is normally only required for new installations, but
when upgrading you may want to review and possibly customize any
new configuration options.
</para>
<para>Open or create the file <emphasis>config_inc.php</emphasis> in an
editor and add or modify any values as required. These will
override the default values.
</para>
<para>You may want to use the provided
<emphasis>config_inc.php.sample</emphasis> file
as a starting point.
</para>
<para>WARNING: you should never edit the
<emphasis>config_default_inc.php</emphasis> file
directly, as it could cause issues with future upgrades.
</para>
</section>
<section id="admin.install.postcommon">
<title>Post-installation and upgrade tasks</title>
<para>Instructions in this section are common to both new installations
and upgrades, and should be applied after completing either process.
</para>
<orderedlist>
<listitem>
<para>Test your configuration
</para>
<para>Load up <emphasis>admin/check.php</emphasis>
to validate if everything is setup correctly.
</para>
<para>NOTE (for PHP 5.2 only):
check.php sometimes reports the value of
<emphasis>register_globals</emphasis> incorrectly.
To confirm the correct value,
Create a page with this line in it:
<programlisting><?php phpinfo(); ?></programlisting>
save it with a .php extension and load it up in your
web browser.
</para>
</listitem>
<listitem>
<para>Delete the <emphasis>admin</emphasis> folder
</para>
<para>For security reasons, the scripts within this directory
should not be accessible on a live MantisBT site or on any
installation that is accessible via the Internet.
</para>
<para>Once you have confirmed that the install/upgrade
was successful, you should delete this directory
<programlisting>rm -r admin</programlisting>
</para>
</listitem>
</orderedlist>
</section>
<section id="admin.install.postinstall">
<title>Post-installation tasks</title>
<para>Instructions in this section should only be applied after a
new installation
</para>
<orderedlist>
<listitem>
<para>Login to your bugtracker
</para>
<para>Use the default Administrator account.
The id and password are <emphasis>administrator / root</emphasis>.
</para>
</listitem>
<listitem>
<para>Create a new Administrator account
</para>
<para>Go to <emphasis>Manage > Manage Users</emphasis>
and create a new account with 'administrator'
access level.
</para>
</listitem>
<listitem>
<para>Disable or delete the default Administrator account
</para>
</listitem>
<listitem>
<para>Create a new Project
</para>
<para>Go to <emphasis>Manage > Manage Projects</emphasis>
and create a new project
</para>
</listitem>
</orderedlist>
</section>
<section id="admin.install.postupgrade">
<title>Post-upgrade tasks</title>
<para>Instructions in this section should only be applied after
upgrading an existing installation.
</para>
<orderedlist>
<listitem>
<para>Test the new release
</para>
<para>Perform any additional testing as appropriate to ensure
the new version does not introduce any regressions.
</para>
</listitem>
<listitem>
<para>Switch the site to the new version
</para>
<para>The commands below should be executed from the web root
(or wherever the mantisbt scripts are installed)
and assume that the "live" directory (old version)
is named <emphasis>mantisbt</emphasis> and the new release
directory is <emphasis>mantisbt-1.2.x</emphasis>.
<programlisting>
mv mantisbt mantisbt-old
mv mantisbt-1.2.x mantisbt
</programlisting>
</para>
</listitem>
<listitem>
<para>Put the site back on line
<programlisting>rm mantis_offline.php</programlisting>
This should be the final step in the upgrade process, as
it will let users login again.
</para>
</listitem>
</orderedlist>
</section>
<section id="admin.install.requirements">
<title>Requirements</title>
<para>The following versions are required for proper operation:</para>
<informaltable>
<tgroup cols="3">
<thead>
<row>
<entry>Package</entry>
<entry>Minimum Version</entry>
<entry>Tested with</entry>
</row>
</thead>
<tbody>
<row>
<entry>MySQL</entry>
<entry>4.1.x</entry>
<entry>5.x.x, 6.x.x</entry>
</row>
<row>
<entry>PostgreSQL</entry>
<entry>7.0.0</entry>
<entry>8.x.x, 9.x.x</entry>
</row>
<row>
<entry>PHP</entry>
<entry>5.3.2</entry>
<entry>5.3.2-5.3.x</entry>
</row>
<row>
<entry>Web Server</entry>
<entry></entry>
<entry>Apache 1.3.x, Apache 2.2.x, lighttpd 1.4.x, nginx 0.8.x, IIS 6, IIS 7.x</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>MantisBT is designed in a way to work in as many environments as possible.
Hence the required extensions are minimal and many of them are optional affecting
only one feature. The following PHP extensions are used:</para>
<itemizedlist>
<listitem>
<para>MySQL or PostgreSQL or another vendor specific
database extension that matches the type of database you
are using with MantisBT - mandatory.</para>
</listitem>
<listitem>
<para>Hash - mandatory. This extension is available and
enabled by default in PHP >= 5.1.2. For earlier versions of
PHP you will need to install the PECL Hash extension
manually.</para>
</listitem>
<listitem>
<para>Curl - if the Twitter integration feature is required.</para>
</listitem>
<listitem>
<para>GD - if the captcha and/or graphing features are required.</para>
</listitem>
<listitem>
<para>Fileinfo - Guesses the MIME type of attachments.
This extension is included by default from version 5.3.0
of PHP. For older versions of PHP you will need to install
the fileinfo PECL extension (this requires root access to
the server you're using). Without this extension, file
attachment previews and downloads may not work correctly as
MantisBT won't be able to send the Content-Type header to a
browser requesting an attachment.</para>
</listitem>
</itemizedlist>
</section>
<section id="admin.install.backups">
<title>Backups</title>
<para>It is recommended to backup your MantisBT database on a
regular basis. This is easy to accomplish using the mysqldump
command:
mysqldump -u<username> -p<password> <database
name> > <output file>
To restore a backup you will need to have a clean database. Then
run:
mysql -u<username> -p<password> <database name>
< <input file>
You can also perform both of these tasks using
<ulink url="http://www.phpmyadmin.net/">phpMyAdmin</ulink>
A good idea is to make a backup script and run it regularly through
cron or a task scheduler (for Windows see
<ulink url="http://www.wincron.com/">WinCron</ulink>
).
Using the current date in the filename can prevent overwriting and
make cataloguing easier.
<emphasis>!!! Backups should always be performed before an upgrade !!!</emphasis>
Make sure to backup MantisBT code (which includes your configs +
possibly customization), issue attachments / project documents, and
database contents.
</para>
</section>
<section id="admin.install.uninstall">
<title>Uninstall</title>
<para>
It is recommended that you make an backup in case you wish to use
your data in the future. See <xref linkend="admin.install.backups" />
for details.
To uninstall MantisBT:
<itemizedlist>
<listitem>
<para>Delete the MantisBT directory and all files and
subdirectories.
</para>
</listitem>
<listitem>
<para>Drop all MantisBT tables from the database, these can be
identified by the configured prefix for the installation. The
default prefix is 'mantis'.
</para>
</listitem>
<listitem>
<para>Remove any customizations or additions that you may have
made.
</para>
</listitem>
</itemizedlist>
If you have the permissions to create/drop databases and you have a
specific database for MantisBT that does not contain any other data,
you can drop the whole database.
</para>
</section>
</chapter>