-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathINSTALL
More file actions
620 lines (438 loc) · 22.9 KB
/
INSTALL
File metadata and controls
620 lines (438 loc) · 22.9 KB
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
MRBS Installation Instructions
REQUIREMENTS
---------------------------------------------------------------------------
MRBS works with both MySQL and PostgreSQL 6.5 to 7.2 database systems. You must
have PHP with support for your chosen database system installed and working
for this application. See the PHP (www.php.net), MySQL (www.mysql.com), and
PostgreSQL (www.postgresql.org) sites for more info on setting these up.
You need to know how to install, secure, run, maintain, and back up your
chosen database system.
No optional PHP packages (other than the database system) are required for
this application. This version of MRBS was tested with PHP 4.3.2 and
somewhat with PHP 5.1.2. Older versions of PHP 4 may work, but PHP 3 is
unsupported.
You can run PHP either as a CGI or with a direct module interface (also called
SAPI). These servers include Apache, Microsoft Internet Information Server,
Netscape and iPlanet servers. Many other servers have support for ISAPI, the
Microsoft module interface.
You'll get better performance with PHP setup as a module. Not only will you
not have to deal with the CGI performance hit, but you'll be able to use PHP's
database connection pooling. However, be careful that you don't exceed
the maximum number of connections allowed to your database; with connection
pooling PHP/Apache can potentially create a connection from each Apache
child server to the database.
Also many mrbs authentication schemes use basic http authentication. These
don't work if you run PHP as a CGI.
If you are using PHP as an Apache module, you probably want to ensure that
the Apache MaxRequestsPerChild is not set to 0, in case of undetected memory
leaks in PHP or MRBS.
If you use MySQL, versions 3.22.32, 3.23.23, 3.23.53, 4.0.13, 4.0.14 and
5.0.18 have been tested and reported to work.
If you use PostgreSQL, you will need at least version 7.0, versions 7.0.3
and 8.1.4 has been tested and reported to work.
FILE UNPACKING
---------------------------------------------------------------------------
To install MRBS, just unpack the distribution into a temporary directory,
then copy the files in the "web" subdirectory into a new directory somewhere
your web server can find them.
For example:
Unpack the software into a new temporary directory, something like this:
$ tar -xvzf ~/download/mrbs-1.0.tgz (or whatever version)
$ cd mrbs-1.0 (or whatever version)
If you are upgrading from a previous version of MRBS, you should save your
"config.inc.php" file so you can compare and update the new file with your
site-specific changes. Then rename your existing MRBS web server directory.
For example:
$ cp /var/lib/apache/htdocs/mrbs/config.inc.php config.site.inc
$ mv /var/lib/apache/htdocs/mrbs /var/lib/apache/htdocs/mrbs.old
Now install MRBS by copying the contents of the "web" subdirectory of the
distribution somewhere your web server can find it. For example:
$ cp -r web /var/lib/apache/htdocs/mrbs
DATABASE SETUP
---------------------------------------------------------------------------
If you are upgrading from MRBS version 0.7 or later, and continuing to
use MySQL, your database is already set up, so you can skip to the
Application Setup section.
For a new install:
You can place the MRBS database tables in an existing database or
create a new database with the following:
[MySQL] $ mysqladmin create mrbs
[PostgreSQL] $ createdb mrbs
(This will create a database named "mrbs", but you can use any name.)
Create the MRBS tables using the supplied tables.*.sql file:
[MySQL] $ mysql mrbs < tables.my.sql
[PostgreSQL] $ psql -a -f tables.pg.sql mrbs
where "mrbs" is the name of your database (mentioned above).
This will create all the needed tables.
You may need to set rights on the tables; for PostgreSQL see "grant.pg.sql".
If you use a PHP version less than 4.2, you will also need to replace the pgsql
driver file pgsql.inc with pgsql.before_php42.inc, and rename it to pgsql.inc.
If you need to delete the tables, for PostgreSQL see "destroy.pg.sql".
The tables are now empty and ready for use. If you want to add a few sample
areas and rooms without going through the Admin function, use this script:
[MySQL] $ mysql mrbs < sample-data.sql
[PostgreSQL] $ psql -a -f sample-data.sql mrbs
Substitute the database name you used for "mrbs".
This script is only for use in a newly initialized database! (It will not
work properly in a database where the ID counters are greater than 0.)
Also see the description of testdata.php in the README file.
For an upgrade:
The database format changed slightly between 0.6 and 0.7. To change the
format of your data do:
[MySQL] $ mysql mrbs < upgrade.my.sql
(This does not apply to PostgreSQL, which was not supported then.)
Also see the file UPGRADE in the distribution.
For a second installation or to use different table names:
If you have table name conflicts or want to do a second installation
and only have access to one database, then you can modify the 'mrbs_'
prefix for the table names.
In tables.*.sql you will need to change the table names and then follow
the instructions above for creating the tables in your database.
When editting config.inc.php, you need to change the table name prefix
from "mrbs_" to the value you chose using the variable $db_tbl_prefix.
WARNING: All of the .sql files are setup to use the 'mrbs_' prefix
therefore you will have to edit them before you use them if you
change the prefix for your tables.
Maintenance:
Be sure to back up your database regularly.
For PostgreSQL, be sure to run the "vacuum" command regularly.
You can clean out old entries from your database using the supplied SQL
scripts purge.my.sql (for MySQL) and purge.pg.sql (for PostgreSQL). Read
the comments at the top of the scripts before using them.
APPLICATION SETUP
---------------------------------------------------------------------------
Next, you will need to customize the file "config.inc.php"...
If you are upgrading from a previous version of MRBS, use your saved
copy of "config.inc.php" as a reference. Do not just use your old config.inc.php
file, however, because there changes and new settings.
Refer to the comments in the supplied config.inc.php file for more details.
The following sections can be configured:
1. Database Settings:
First, select your database system. Define one of the following:
$dbsys = "mysql";
$dbsys = "mysqli";
$dbsys = "pgsql";
Then define your database connection parameters. Set the values for:
$db_host = The hostname that the database server is running on.
$db_database = The name of the database containing the MRBS tables.
$db_login = The database login username
$db_password = The database login password for the above login username
If the database server and web server are the same machine, use
$db_host="localhost". Or, with PostgreSQL only, you can use $db_host="" to
use Unix Domain Sockets to connect to the database server on the same machine.
By default, MRBS will use PHP persistent (pooled) database connections,
for better performance. Depending on your web server and database server
configuration, it is possible that this will cause MRBS to reach the maximum
number of connections allowed to your database, since each Apache child
process may keep a connection open. Then, users will randomly get errors
when trying connecting to MRBS. If you would rather use non-persistent
database connections, uncomment the line in "config.inc.php" which sets the
$db_nopersist variable.
If you want to install multiple sets of mrbs tables when only one
SQL database is available, or resolve table name conflicts, you have
to change the prefix of "mrbs_" for the tables in your database,
then you will need to set the value of:
$db_tbl_prefix = The table name prefix
2. Site Identification:
Specify your company or site name, and contact information. The company name
is displayed at the top of each page, and the contact information is
displayed in the help file.
$mrbs_admin = "Your Administrator";
$mrbs_admin_email = "admin_email@your.org";
$mrbs_company = "Your Company";
Alternately, if you want to display your organization logo, replace the
$mrbs_company line like this :
$mrbs_company = "<a href=http://www.your_organization.com/><img src=your_logo.gif border=0></a>";
$url_base = "";
This is to fix URL problems when using a proxy in the environment
If links inside MRBS appear broken, then specify here the URL of
your MRBS root directory, as seen by the users. For example:
$url_base = "http://webtools.uab.ericsson.se/oam";
It is also recommended that you set this if you intend to use email
notifications, to ensure that the correct URL is displayed in the
notification.
3. Calendar Settings:
There are two options here:
- regular consecutive booking periods (default)
for example: every half hour period from 7 AM to 7 PM can be booked
- user-defined periods
for example: school periods where periods are of different lengths
and are not consecutive because of change-over time or breaks.
It is not possible to swap between these two options once bookings have
been created and to have meaningful entries. This is due to differences
in the way that the data is stored.
The settings for each option are described below:
a) Regular Consecutive periods
Specify the resolution in minutes. MRBS will display blocks of this size,
and will round up all entries to an even multiple of this many minutes.
Specify a number which divides evenly into hours, for example one of:
$resolution = 900; # 15 minutes
$resolution = 1800; # Half hour
$resolution = 3600; # Whole hours
Specify the start and end of the day in 24 hour notation, using whole
hours.
$morningstarts = 7; # First block is 7 AM.
$eveningends = 19; # Last block starts at 7 PM.
For additional control there are $morningstarts_minutes and
$eveningends_minutes.
$morningstarts_minutes gives you more control over the starting block
displayed for each day. For example, to start a day at
8:30 am:
$morningstarts = 8;
$morningstarts_minutes = 30;
$eveningends_minutes gives you more control over the last block displayed
for each day. For example, to display full 24 hour days with 30 minute
intervals:
$resolution = 1800;
$morningstarts = 0;
$eveningends = 23;
$eveningends_minutes = 30;
Note: Be careful to avoid specifying options that display blocks
overlaping the next day, since it is not properly handled.
b) User-defined periods
To enable this option set
$enable_periods = TRUE;
Then define the names of the periods that you wish to use in chronological
order. This is a free-form field and can contain anything, such as a
descriptive name for the period or the start and end time.
For example:
$periods[] = "Period 1";
$periods[] = "Period 2";
...
or
$periods[] = "09:15 - 09:50";
$periods[] = "09:55 - 10:35";
...
is used to ensure that the name or description is not wrapped
when the browser determines the column widths to use in day and week
views.
A maximum of 60 periods may be defined.
Note:
1) Changing the number of periods after bookings have been entered may
lead to incorrect reservations being displayed where the booking does not
end on the day that it starts.
2) The periods bear no relation to clock time during a day.
To control international preferences for the calendar displays,
- use $weekstarts to change the first day of the week from the default of
Sunday;
- use $dateformat to show dates as "Month Day" or "Day Month"
in the page footers;
- use $twentyfourhour_format to show dates in 12 or 24 hour
format.
4. Miscellaneous Settings:
These settings control:
- the maximum number of repeat entries which can be created at once (a safety
feature),
- the default report time period,
- the number of search results to return per page,
- the page refresh rate,
- the way area/rooms are selected (html list or a drop-down select box),
- the way entries are displayed in monthly view (start/end slot, brief
description or both),
- the way weeks are displayed in the bottom of the page (as week numbers (ie.
42) instead of 'first day of the week' (13 Oct)),
- display of times on right and left side in day and week view,
- display of horizontal stripes on the day view,
- cells highlighting options,
- the default starting view (month, week or day),
- the default room to start with.
5. Authentication:
Read the file AUTHENTICATION for information about this section. By default,
config.inc.php uses "php" session management and "config" authentication
method, allowing only demo users to book rooms, and "administrator" is defined
to administer the system. Demo users are "alice" and "bob" (passwords "a" and
"b") and "administrator" (password 'secret') is administrator.
6. Email support:
MRBS can send emails to various recipients and in accordance with events.
There are four recipients types:
- MRBS administrator
- Area administrators
- Room administrators
- Bookers
With settings described below, you can decide that MRBS sends emails to all
these recipients, or any combination of them. Each one can be selected
individually. Note that the word 'administrator' is used here only for mail
purposes, it is not related to any approval workflow.
There are three events types:
- entry creation
- entry change
- entry deletion
As for recipients, you can choose to send mails for any of these three events.
There are many other settings, including mail transport agent (php mail, smtp
server, unix sendmail), content of the mail subject and body, either a link to
the entries or full description (with changes between edited entry and its
previous state). Read the following parameters for detailed informations:
MAIL_ADMIN_ON_BOOKINGS
Set to TRUE if you want to be notified when entries are booked. Default is
FALSE
MAIL_AREA_ADMIN_ON_BOOKINGS
Set to TRUE if you want AREA ADMIN to be notified when entries are booked.
Default is FALSE. Area admin emails are set in room_area admin page.
MAIL_ROOM_ADMIN_ON_BOOKINGS
Set to TRUE if you want ROOM ADMIN to be notified when entries are booked.
Default is FALSE. Room admin emails are set in room_area admin page.
MAIL_ADMIN_ON_DELETE
Set to TRUE if you want ADMIN to be notified when entries are deleted. Email
will be sent to mrbs admin, area admin and room admin as per above settings,
as well as to booker if MAIL_BOOKER is TRUE (see below).
MAIL_ADMIN_ALL
Set to TRUE if you want to be notified on every change (i.e, on new entries)
but also each time they are edited. Edited entries will display the modified
fields in brackets after the new value if MAIL_DETAILS is set to TRUE
(see below). Default is FALSE (only new entries).
MAIL_DETAILS
Set to TRUE is you want to show entry details in email, otherwise only a
link to view_entry is provided. Irrelevant for deleted entries, as email body
will always have entry details, since there is no possibility to provide a
link. Default is FALSE.
MAIL_BOOKER
Set to TRUE if you want the entry booker to receive a copy of his entry as
well as any future changes (depends of MAIL_ADMIN_ALL, see below). Default
is FALSE. MRBS can turn some of your user databases to advantage, as there
are several authentication schemes where the username is the same as
the email address username .For example, if your mrbs users come from an
ldap directory and mrbs use this authentication scheme, it is likely your
organisation emails addresses will use this username with '@domain'. If
this is the case, you just have to set MAIL_BOOKER to TRUE and provide your
domain below. This setting is available too if you use MRBS own user
database (auth_db).
MAIL_DOMAIN
If MAIL_BOOKER is set to TRUE (see above) and you use an authentication
scheme other than 'auth_db', you need to provide the mail domain that will
be appended to the username to produce a valid email address (ie.
"@domain.com").
MAIL_USERNAME_SUFFIX
If you use MAIL_DOMAIN above and username returned by mrbs contains extra
strings appended like domain name ('username.domain'), you need to provide
this extra string here so that it will be removed from the username.
MAIL_ADMIN_BACKEND
Set the name of the backend to use to transport your mails. Either "mail",
"smtp" or "sendmail":
· mail
Sends a mail using PHPs build-in mail()-function. This means this function
must not be disabled and you have a minimal control over your server and
settings in php.ini :
'SMTP' and 'smtp_port' for Windows and 'sendmail_from' and 'sendmail_path'
for Unix
· sendmail
Sends a mail using a sendmail unix program.
· smtp
Sends a mail connecting directly to an smtp server.
# Sendmail settings
SENDMAIL_PATH
Set the path of the Sendmail program (only used with "sendmail" backend).
Default is "/usr/bin/sendmail"
SENDMAIL_ARGS
Set additional Sendmail parameters (only used with "sendmail" backend).
(example "-t -i"). Default is ""
# SMTP settings
SMTP_HOST
Set smtp server to connect. Default is 'localhost' (only used with "smtp"
backend).
SMTP_PORT
Set smtp port to connect. Default is '25' (only used with "smtp" backend).
SMTP_AUTH
Set whether or not to use SMTP authentication. Default is 'FALSE'
SMTP_USERNAME
Set the username to use for SMTP authentication. Use only if SMTP_AUTH is
set to TRUE. Default is ''
SMTP_PASSWORD
Set the password to use for SMTP authentication. Use only if SMTP_AUTH is
set to TRUE. Default is ''
# Miscellaneous settings
MAIL_ADMIN_LANG
Set the language used for emails (chooses from an available lang.* file).
Default is 'en'.
MAIL_FROM
Set the email address of the From field. Default is the $mrbs_admin_email
variable.
MAIL_RECIPIENTS
Set the recipient email. Default is $mrbs_admin_email. You can define
more than one recipient like this "john@doe.com,scott@tiger.com"
MAIL_CC
Set email address of the Carbon Copy field. Default is ''. You can define
more than one recipient (see MAIL_RECIPIENTS)
$mail["subject"]
Set the content of the Subject field. Default is
"Entry added/changed for $mrbs_company MRBS"
$mail["subject_delete"]
Set the content of the Subject field for deleted fields. Default is
"Entry deleted for $mrbs_company MRBS";
$mail["new_entry"]
Set the content of the message when a new entry is booked. What you type
here will be added at the top of the message body. Default is:
"A new entry has been booked, here are the details:"
$mail["changed_entry"]
Set the content of the message when an entry is modified. What you type
here will be added at the top of the message body. Default is:
"An entry has been modified, here are the details:"
$mail["deleted_entry"]
Set the content of the message when an entry is deleted. What you type
here will be added at the top of the message body. Default is
"An entry has been deleted, here are the details:"
7. Language:
MRBS supports multiple languages, which can be used at the same time, based on
what the client is using. Users can configure their web browsers to prefer
one language over another, and MRBS will attempt to serve the MRBS pages in
the user's preferred language. You can specify the default language in
config.inc.php. See the file called LANGUAGE for more info.
MRBS also uses your server's OS locale support to localise date/time strings.
MRBS attempts to figure out what locale should be used based on your
preferred language and the server OS. Use "locale -a" on your unix system to
find out what locale support is installed. On Windows any language supported
by Windows should work.
From mrbs-1.2-pre2, MRBS is internationalised as long as the config
variable $unicode_encoding is set to 1 (which is the default setting).
If this is set, then MRBS serves all of its pages in UTF-8 and stores
everything in the database in UTF-8. This means that all languages work
together.
IF THIS DOES NOT WORK for you (your server may not have unicode support),
just set $unicode_encoding to 0. MRBS will run the old way, with pages
being served in an encoding based on the language, and the encoding of data
in the database being a mess of different encodings based on the users'
preferred language.
To use Unicode, php should be built with 'iconv' support ('--with-iconv'
directive), or have the iconv extension installed and enabled. On Windows,
if you are using PHP 5, iconv support is built-in.
For PHP 4 on Windows, three things are needed :
- iconv.dll file in in the system path. Either copy it from your
\%phpdir%\dlls\ directory into \%windir%\system32\ directory,
or add your \%phpdir%\dlls\ directory to your PATH environment variable.
(Note: for Microsoft IIS, you HAVE to copy iconv.dll into \%windir%\system32\)
- uncomment php_iconv.dll in php.ini.
- extension directory in php.ini have to be properly set to your actual
\%phpdir%\extensions\
Note: Upgrading mysql database from previous charsets to Unicode :
You can use convert_db_to_utf8.php script to convert text in the
database to UTF8, to use MRBS with $unicode_encoding set to 1. The
administrator should copy it into the web directory, run it (choosing
the encoding to convert from) ONCE, and then move it back out of the
web directory. We recommend you backup your database before running
this script if you are at all worried.
8. Entry Types:
By default, MRBS defines two "meeting types" - internal and external. There
are a total of 10 types ready to be used, if you assign names to them in
your config.inc.php file. Each type has a color, defined in the style sheet.
HELP/FAQ File:
Customize site_faq.html if desired. It contains help that can be tailored
to your environment. Currently this help is available in a number of
languages.
SECURITY NOTES!
---------------------------------------------------------------------------
You can configure your web server so that users can not obtain the ".inc"
files but this is not essential, since critical files containing your
database login and password use a ".php" extension like config.inc.php.
See your web server documentation on how to do this.
There is an Apache .htaccess file included, but Apache might ignore it because
of the "AllowOverride None" in your httpd.conf. Either change "AllowOverride
None" to "AllowOverride Limit", create a new <Directory> entry with the
contents of the .htaccess file in it, or add the contents of the .htaccess
to httpd.conf where it says "<Files ~ "^\.ht">". And then read the Apache
docs five or six times, until you know what you just did.
You may protect "config.inc.php" to only allow the web server to read it.
For example: # chown httpd config.inc.php; chmod 400 config.inc.php
The script "testdata.php" is for testing only. Do not leave it in a
directory accessible to your web server. Anyone running this will add a
large number of test entries to your database, regardless of
authentication, and book all your rooms to people you've never heard of.
$Id: INSTALL 798 2008-04-13 19:59:24Z jberanek $