forked from 01-Scripts/BookedScheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme_installation.html
356 lines (292 loc) · 15 KB
/
readme_installation.html
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Booked Installation</title>
<style type="text/css">
h1.section {
border-bottom: solid 1px #666;
color: #333;
padding: 3px 10px;
}
h2 {
border: solid 1px #666;
background-color: #f0f0f0;
color: #1a3083;
padding: 3px 10px;
}
h3 {
border-bottom: solid 1px #999;
}
h4 {
border: solid 1px #666;
background-color: #f0f0f0;
color: #727E0A;
padding: 3px 10px;
}
.setting {
font-family: courier;
color: #006400;
font-size: smaller;
}
.important {
color: red;
}
</style>
</head>
<body>
<h1>Booked Installation</h1>
<h2>Hosting</h2>
<div>We offer professional Booked hosting direct from the authors. Let us handle the installation and maintenance of Booked.</div>
<div><a href="https://www.bookedscheduler.com/free-trial-signup">Start a 30 day free trial now!</a></div>
<h2><span STYLE="color:#727E0A">Prerequisites</span></h2>
<ul>
<li>PHP 5.6 or greater</li>
<li>MySQL 5.5 or greater</li>
<li>Web server (Apache, IIS)</li>
</ul>
<div STYLE="font-style: italic;">
Note: for users without web hosting service or existing environment, packages like <a
href="http://www.apachefriends.org/en/index.html">XAMMP</a> or <a href="http://www.wampserver.com/en/">WampServer</a>
can help you get set up quickly.<br/>
</div>
<h1 class="section">Fresh Installation</h1>
<h2>Application Deployment to Server</h2>
<div>
<ul>
<li>Unzip the archived distribution to your webserver's document root. Or</li>
<li>If you don't have direct access to your document root or use hosting service,
then transfer the extracted directory to your web server's document root using FTP or <a
href="http://sourceforge.net/projects/winscp/">WinSCP</a>.
</li>
<li>Copy /config/config.dist.php to /config/config.php and adjust the settings for your environment.</li>
<li><span class="important">Important!</span> The web server must have write access (0755) to
/your-booked/tpl_c and /your-booked/tpl
<a href="http://www.smarty.net/docs/en/variable.compile.dir.tpl">(want to know why?)</a>
<ul>
<li>If using an FTP client, check read/write/execute for Owner and Group on /tpl, /tpl_c, and /uploads
</li>
</ul>
</li>
<li><span class="important">Important!</span> Booked will not work if PHP <a
href="http://www.php.net/manual/en/session.configuration.php#ini.session.auto-start">session.autostart</a>
is enabled. Ensure this setting is disabled.
</li>
</ul>
</div>
<h2>Application Configuration</h2>
<div>
You can configure Booked to fit your environments and needs, or use the minimal default settings which should
be enough for the application to work. We recommend you to change according to your specifics. Additional
information on all configuration settings can be found in the application help page.
<ul>
<li>To configure the application, you can open /config/config.php and alter any settings accordingly.
The admin email address can be set in the booked/config/config.php file of setting
<span class="setting">$conf['settings']['admin.email']</span>.<br/>
When later register an account with admin email address the user will be given admin privilege.
</li>
<li>In addition, to allow resource image uploads, the web-server must also have read/write
access to your configurable uploads directory of <span class="setting">$conf['settings']['image.upload.directory']</span>
in the config.php.
</li>
<li>By default, Booked uses standard username/password for user authentication. Alternatively, you can
use LDAP authentication.
<br/>See the plugins section of the application help page for more details.
</li>
</ul>
Note: If you try to load the application at this time (eg. http://yourhostname/booked/Web/), you will
probably get a white page. This is because there is no backend database configured yet. So continue on ...
</div>
<h2>Database Setup</h2>
You have 2 ways to set up your database for the application to work.
<h3>Automatically</h3>
<div>You must have the application configured correctly before running the automated install.</div>
<div>
<ul>
<li>The automated database setup only supports MySQL at this time. To run the automated database setup, navigate
to the
/Web/install directory in a web browser and follow the on-screen instructions.
</li>
<li>Note: Some may see directory permission issues displayed on the page. The web server must have write access
to /your-booked/tpl_c and /your-booked/tpl.
If you cannot provide the required permission. Contact your web server administrator or hosting service to
resolve or run the manual install.
</li>
</ul>
</div>
OR<br/>
<h3>Manually</h3>
<div>
The packaged database scripts make assumptions about your desired database configuration and set default values.
Please edit them to suit your environment before running. The files are located in
booked/database_schema/. <br/> <br/>
Import the following sql files in the listed order (we recommend <a
href="http://www.phpmyadmin.net/documentation/">phpMyAdmin</a> for this):
</div>
<div>
<h4>On a remote host with no database creation privileges</h4>
<p>If you are installing Booked on a remote host, please follow these steps. These steps assume you are using
cPanel and have the ability to create databases via the cPanel tool and phpMyAdmin.</p>
<p>Adding the database and user</p>
<ul>
<li>Select the MySQL Databases tool</li>
<li>Add a new user with username and password of your choice. This will be the database user and database
password set in
your Booked config file. <b>Please be aware that some hosts will prefix your database user name.</b>
</li>
<li>Create a new database with whatever name you choose. This will be the name of the database in your
Booked config file. 'bookedscheduler' is the recommended database name. <b>Please be aware that some
hosts will prefix your database name.</b>
</li>
<li>Associate the new user with the new database, giving the user permission to SELECT, CREATE, UPDATE, INSERT
and DELETE. Click the 'Add User to Db' button.
</ul>
<p>Creating tables</p>
<ul>
<li>Open phpMyAdmin.</li>
<li>Click on the database name that you just created in the left panel.</li>
<li>Click the SQL tab at the top of the page.</li>
<li>Import "/database_schema/create-schema.sql" to bookedscheduler (or whatever database name was used in the
creation process)
</li>
<li>Import "/database_schema/create-data.sql" to bookedscheduler (or whatever database name was used in the
creation process)
</li>
</ul>
</div>
<div>
<h4>If you have database creation privileges in MySQL</h4>
<ul>
<li>Open "/database_schema/full-install.sql" and edit the database name and username/password to match your
config.php database values
</li>
<li>Run or import "/database_schema/full-install.sql"</li>
<li>Optionally - run/import "/database_schema/testdata-utf8.sql" to bookedscheduler (sample application data will
be created with 2 users: admin/password and user/password). These users are available for testing your
installation.
</li>
</ul>
<span STYLE="color:green;">You are done. Try to load the application at (eg. http://yourhostname/booked/Web/).</span>
</div>
<h2>Registering the Administrator Account</h2>
After the database has been set up you will need to register the account for your application administrator. Navigate to
register.php register an account with email address set in $conf['settings']['admin.email'].
<h1 class="section">Upgrading</h1>
<a name="upgrading"></a>
<h2>Upgrading from a previous version of Booked 2.x (or phpScheduleIt 2.x)</h2>
<div>
The steps for upgrading from a previous version of Booked are very similar to the steps described above in
Application Deployment to Server.
<h3>Recommended</h3>
<p>The recommended approach is to backup your current Booked files, then upload the new files to the
that same location. This prevents any old files from interfering with new ones.</p>
<p>After the new files are uploaded, copy your old config/config.php file to the config directory in the new
version. Then run /Web/install/configure.php to bring your config file up to date.</p>
<p>If you have any uploaded resource images you will need to copy them from their old location to the new
one.</p>
<h3>Alternative</h3>
<p>An alternative upgrade approach is to overwrite the current Booked files with the new ones. If doing this,
you must delete the contents of /tpl_c. This approach will not allow you to roll back and will not clear out any
obsolete files.</p>
<h3>Database</h3>
<p>
After the application files have been upgraded you will need to upgrade the database.
</p>
<h4>Automatically</h4>
<p>The automatic database upgrade is exactly the same as the automatic database install. Please follow the
instructions in the Automatic Database Setup section above.</p>
<h4>Manually</h4>
<div>
The packaged database scripts make assumptions about your desired database configuration and set default values.
Please edit them to suit your environment before running. The files are located in
booked/database_schema/upgrades. <br/> <br/>
Depending on your current version, import the upgrade.sql file within each subdirectory to get to the current
version (we recommend <a
href="http://www.phpmyadmin.net/documentation/">phpMyAdmin</a> for this).<br/><br/>
For example, if you are running version 2.0 and the current version is 2.2 then you should run
booked/database_schema/upgrade/2.1/upgrade.sql then booked/database_schema/upgrade/2.2/upgrade.sql
</div>
</div>
<h2>Migrating from version 1.2</h2>
<div>A migration from 1.2 to 2.0 is supported for MySQL only. This can be run after the 2.0 installation. To run the
migration open /Web/install/migrate.php directory in a web browser and follow the on-screen instructions.
</div>
<h1 class="section">Getting Started</h1>
<h2>The First Login</h2>
<div>There are 2 main types of accounts, they are admin and user account.</div>
<ul>
<li>If you imported a sample application data, you now can use admin/password and user/password to login and make
changes or addition via the application.
</li>
<li>If not, <b>you will need to register an account with your configured admin email address</b>. The admin email
address
can be set in the booked/config/config.php file of setting <span class="setting">$conf['settings']['admin.email']</span>.
Other self registration accounts are defaulted to normal users.<br/>
After registration you will be logged in automatically. <span STYLE="color:red">Important!</span> At this time,
it is recommended to change your password.
</li>
<li>For LDAP authentication please login with your LDAP username/password.</li>
</ul>
<h2>Log Files</h2>
Booked logs multiple levels of information categorized into either application or database logs. To do this, the
log4php library is used. By default, logging is turned OFF.
<ul>
<li>First, rename /config/log4php.config.dist.xml to /config/log4php.config.xml</li>
<li>To allow application logging, the PHP account requires write access (0755) to your configured log directory.
</li>
<li>Logging is configured in /config/log4php.config.xml
<ul>
<li>For Windows, set the path to something similar to <param name="file" value="c:/temp/log_%s.log"
/></li>
<li>For Unix, set the path to something similar to <param name="file" value="/tmp/bookedscheduler/log_%s.log"
/></li>
</ul>
</li>
<li>Logging is controlled by changing the <level> of each <logger></li>
<li>Levels used by Booked are OFF, DEBUG, ERROR. For normal operation, ERROR is appropriate. If trace logs
are needed, DEBUG is appropriate.
</li>
<li>To turn on application logging, change the <level value="OFF" /> to an appropriate level for
either the default or sql loggers.
For example, <level value="ERROR" /></li>
<li>For more information on logging configuration, visit <a href="http://logging.apache.org/log4php/">log4php</a>
</li>
</ul>
<h1 class="section">Enabling Booked API</h1>
Booked has the option to expose a RESTful JSON API. This API can be leveraged for third party integration,
automation or to develop client applications.
<h2>Prerequisites</h2>
<ul>
<li>PHP 5.3 or greater</li>
<li>To use 'friendly' URLs, mod_rewrite or URL rewriting must be enabled</li>
<li>Your web server must accept all verbs: GET, POST, PUT, DELETE</li>
</ul>
<h2>Configuration</h2>
<ul>
<li>Set $conf['settings']['api']['enabled'] = 'true'; in your config file.</li>
<li>If you want friendly URL paths, mod_rewrite or URL rewriting must be enabled. Note, this is not required in
order
to use the API.
</li>
<li>If using mod_rewrite and an Apache alias, ensure RewriteBase in /Web/Services/.htaccess is set to that alias
root.
</li>
</ul>
<h2>API Documentation</h2>
Auto-generated documentation for API usage can be found by browsing http://your_booked_url/Web/Services. This
documentation describes each available service, indicates whether or not the service is available to unauthenticated
users/administrators, and provides example requests/responses.
<h2>Consuming the API</h2>
If URL rewriting is being used, all services will be available from http://your_booked_url/Web/Services<br/>
If not using URL rewriting, all services will be available from
http://your_booked_url/Web/Services/index.php<br/><br/>
Certain services are only available to authenticated users or administrators. Secure services will require a session
token and userid, which can be obtained from the Authentication service.
<h1 class="section">Support</h1>
<div>
Please post any questions or issues under the Booked 2 section of the forums on
<a href="http://php.brickhost.com/forums">http://php.brickhost.com/forums</a>. Here you may also find some answers
to your questions previously asked by other people.
</div>
</body>
</html>