preliminary web config editor
[freeside.git] / httemplate / docs / config.html
1 <head>
2   <title>Configuration files</title>
3 </head>
4 <body>
5   <h1>Configuration files</h1>
6 <ul>
7   <li>Create the <b>/usr/local/etc/freeside</b> directory to hold your configuration.
8   <li>Setting up <a href="http://www.apache.org/docs/misc/FAQ.html#user-authentication">Apache user authetication</a> is mandatory.
9   <li>Create the <b>/usr/local/etc/freeside/mapsecrets</b> file, which maps Apache users to a secrets file which contains a DBI data source, username and password.  Every
10 line in <b>/usr/local/etc/freeside/mapsecrets</b> should contain a username and
11 filename, separated by whitespace.  Note that these are not local usernames -
12 they are passed from Apache.  <a href="http://www.apache.org/docs/misc/FAQ.html#user-authentication">
13 Apache user authetication</a> is mandatory.  For example, if you had the Apache users admin,
14 john, and sam,  
15 you mapsecrets file might look like:
16 <pre>
17 admin secretfile
18 john secretfile
19 sam secretfile
20 </pre>
21   <li>Next, the filename(s) referenced in <b>/usr/local/etc/freeside/mapsecrets</b> file should be created in the <b>/usr/local/etc/freeside/</b> directory.  Each file contains three lines: <a href="http://search.cpan.org/doc/TIMB/DBI-1.15/DBI.pm">DBI data source</a> (for example,
22   <tt>DBI:mysql:freeside</tt> or <tt>DBI:Pg:host=localhost;dbname=freeside</tt>), database username, and database password.
23   These files should not be world readable.  See the <a href="http://search.cpan.org/doc/TIMB/DBI-1.15/DBI.pm">DBI manpage</a> and the <a href="http://search.cpan.org/search?mode=module&query=DBD">manpage for your DBD</a> for the exact syntax of a DBI data source.  In a normal installation such as the example above, a single file <b>/usr/local/etc/freeside/secretfile</b> would be created - for example:
24 <pre>
25 DBI:Pg:host=localhost;dbname=freeside
26 dbusername
27 dbpassword
28 </pre>
29 <li>Create the <b>/usr/local/etc/freeside/conf.<i>datasource</i></b> directory, for example, <b>/usr/local/etc/freeside/conf.DBI:Pg:host=localhost;dbname=freeside</b> (remember to backslash-escape the ; character when creating directories in the shell:
30 <pre>mkdir&nbsp;/usr/local/etc/freeside/conf.DBI:Pg:host=localhost\;dbname=freeside
31 </pre>
32 <li>The rest of the configuration can be done with the web interface.  Select <u>Configuration</u> from the main menu and update your configuration values.
33 </ul>
34 </body>
35 </html>