/[docman2]/doc/install.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /doc/install.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations)
Mon Jul 29 09:36:23 2002 UTC (21 years, 9 months ago) by dpavlin
Branch: MAIN
Changes since 1.5: +19 -10 lines
File MIME type: text/html
misc fixes

1 dpavlin 1.1 <h1>Installation instructions</h1>
2    
3 dpavlin 1.6 <p><small>Just <a href="upgrade.html">upgrading from v1.x</a> or
4     <a href="upgrade.html#cvs">updating to latest v2.x version</a>?
5     </small>
6     </p>
7    
8 dpavlin 1.1 <ol>
9     <li>You will need <a href="http://www.apache.org/">Apache</a> web server
10 dpavlin 1.6 (it should work with version 1.3 or 2.0, but it's not tested with 2.0)
11 dpavlin 1.1 and <a href="http://www.php.net/">php</a> version 4.x installed and
12     configured for docman to work.
13     <small><a href="faq.html#php3">related FAQ question</a></small>
14     <li>Get latest version of Document Manager from
15 dpavlin 1.6 <a href="http://www.rot13.org/~dpavlin/docman.html">
16     http://www.rot13.org/~dpavlin/docman.html</a>
17 dpavlin 1.1
18     <li>Go to installation directory (which <b>shouldn't be</b> under your web
19     server's DocumentRoot) and untar distribution
20     <pre>
21     cd /home/httpd
22     tar xvfz docman-2*.tar.gz
23     </pre>
24 dpavlin 1.4 Make a symlink from current version (2.x) to default directory name
25     <tt>docman2</tt>
26     <pre>
27     ln -s docman-2.x docman2
28     </pre>
29 dpavlin 1.1 If you decide to install docman in some other directory, change
30     <tt>$gblIncDir</tt> to that directory in <a href="#realm">
31     <tt>realm/http_virtual_host.conf</tt></a>!
32 dpavlin 1.4 <br>If you don't want to use virtual hosts to separate docman
33     installations on same host, but instead use directory name before
34     <tt>docman.php</tt> script please read whole installation instructions
35     and than <a href="admin.html#path_realm">Using script path as realm name</a>
36     to correct all instructions.
37 dpavlin 1.1
38     <li>Go to directory which you want to have under Document Manager control
39 dpavlin 1.6 (this directory also <b>shouldn't be</b> accessible from your web server
40     tree)
41 dpavlin 1.1 <pre>
42     cd /home/httpd/repository
43     </pre>
44     chmod that directory so that web server can write in it.
45     <pre>
46     chown nobody /home/httpd/repository
47     </pre>
48     <li>Make a symlink from that directory to file which will be directory index
49     <pre>
50     ln -s /home/httpd/docman2/docman.php \
51     /home/httpd/http_virtual_host/index.php
52     </pre>
53    
54     <a name="docman.css">
55     <li> <i>optional, performance</i>
56     Make a symlink from docman.css file to your web-exported directory
57     <pre>
58     ln -s /home/httpd/docman2/html/docman.css \
59     /home/httpd/http_virtual_host/docman.css
60     </pre>
61    
62     <a name="docman_conf">
63     <li>Copy docman <a href="upgrade.html#docman_conf">master configuration</a>
64     file to <tt>/etc/docman.conf</tt>. If you
65 dpavlin 1.6 want, you can change location of that file (so it's not in <tt>/etc</tt>)
66     on top of <tt>docman.php</tt>
67 dpavlin 1.1 but that will break automatic cvs update
68     <small>(see <a href="upgrade.html#cvs">upgrade via CVS</a>)</small>
69     <pre>
70     cp /home/httpd/docman2/docman.conf /etc/docman.conf
71     </pre>
72 dpavlin 1.6 If you haven't installed docman in <tt>/home/httpd/docman2</tt> change
73     <tt>$gblIncDir</tt> to your installation directory.
74     <br>You can also enter values for <tt>$fsRealmDir</tt> (normally
75 dpavlin 1.1 set to <tt>$gblIncDir/realm</tt>) there (and to some location
76     which is not your docman installation).
77    
78     <a name="realm">
79     <li>Go into docman's <tt>realm</tt> directory and copy template configuration
80     into your <tt>http_virtual_host.conf</tt>
81     <pre>
82     cp /home/httpd/docman2/realm/localhost.conf.dist \
83     /home/httpd/docman2/realm/http_virtual_host.conf
84     </pre>
85     More about <a href="new_directory_layout.html#realm">realms</a> can
86     be found elsewhere in documentation.
87    
88     <br><b>Be sure to change</b> <tt>$gblRepositoryDir</tt> in
89     <tt>realm/http_virtual_host.conf</tt> to match your repository
90     directory (the one with user files and writable by web server).
91    
92     <li>Make Apache Virtual Host configuration for hostname <i>http_virtual_host</i>
93     to point to <tt>/home/httpd/http_virtual_host</tt>.
94    
95     <br>How to do that is beyond scope of this document. Please examine
96 dpavlin 1.6 <a href="http://httpd.apache.org/docs-project/">Apache documentation</a>.
97 dpavlin 1.1
98     <br>If you don't want to use virtual hosts for docman installation, your
99     realm will be called the same as ServerName.
100    
101     <br>Add new DirectoryIndex entry to your Apache configuration file. If you
102     are using virtual hosts, add it there. If your
103     Apache has config files in <tt>/etc/httpd/conf/httpd.conf</tt> find a line
104     like
105     <pre>
106     DirectoryIndex index.html index.htm
107     </pre>
108     and add <tt>index.php</tt> at the end.
109     <pre>
110     DirectoryIndex index.html index.htm index.php
111     </pre>
112    
113     <li><i>if you don't want to users in SQL database</i>
114     Go to you web server <tt>http://http_virtual_host/</tt> and you should get
115 dpavlin 1.5 authorization request. If you want to add
116     <a href="trustee.html#anonymous">anonymous access</a> (without
117 dpavlin 1.6 login and password) skip to <a href="#trustee">trustee</a> section.
118 dpavlin 1.1
119 dpavlin 1.4 <br>Edit <tt>realm/http_virtual_host.htusers</tt> file to add users.
120 dpavlin 1.1 You can do that by calling <tt>adduser.pl</tt> script with name of
121     your htusers file like this:
122     <pre>
123     $ cd /home/httpd/docman2
124     $ ./adduser.pl realm/http_virtual_host.conf
125     </pre>
126     If you press just <i>enter</i> for password or enter <tt>auth_pop3</tt>
127 dpavlin 1.2 docman will use e-mail address to connect to pop3 server and check
128 dpavlin 1.1 password on it. For that e-mail address must be in following form:
129     <tt>pop3login@pop3server.mydomain</tt>
130    
131     <br>E-mail addresses are also used for notification of changes in
132     repository, so if your pop3 account is not a valid e-mail address that
133     won't work for you.
134     <br>However, one of planned enhancements is e-mail notification to
135     addresses which are not from htusers file, so watch out.
136    
137     <li> <i>alternative your users are in SQL database</i>
138     Change <tt>$gblUsers</tt>
139     in <tt>realm/http_virtual_host.conf</tt> to
140     <tt>$gblUsers = "htusers_sql";</tt>
141    
142     <p><i>Since I will convert all code to use PEAR, you again have to
143     download php-dbi classes, because they are not included with docman
144     anymore. This feature is not tested in version 2.0. Look out!</i></p>
145    
146     <br>Download php-dbi class from
147 dpavlin 1.6 <a href="http://pil.dk/downloads/">
148     http://pil.dk/downloads/dbi*.tar.gz</a> and
149 dpavlin 1.1 untar it in docman's directory
150     <pre>
151     cd /home/httpd/docman2
152     tar xvfz dbi.tar.gz
153     </pre>
154     Construct SQL query which returns login, full name, password and
155     email from your tables(s). If you don't have some of that data, replace
156     them with literal strings.
157     <blockquote>
158     e.g. If your table is called <tt>my_users</tt> with columns <tt>who</tt>
159     in which is login and column <tt>pw</tt> in which is plain text
160     password you can use following query to get requested format:
161     <br><tt>select who,'Auth user',pw,'nobody@com' from my_users</tt>
162     </blockquote>
163    
164     Enter that SQL query under <tt>$dbi_sql</tt> in
165     <tt>realm/http_virtual_host.conf</tt>.
166    
167     <br>Construct <tt>$dbi</tt> in <tt>realm/http_virtual_host.conf</tt>
168     in following format:
169     <pre>
170     $dbi = "driver:database:user:password"
171     </pre>
172    
173     Field <i>driver</i> can be: <tt>pgsql</tt>, <tt>mysql</tt>, <tt>oracle</tt>
174     or <tt>odbc</tt> (or other if supported by current php-dbi), <i>database</i>
175     is name of database in which are your users and <i>user</i>/<i>password</i>
176     are credentials for user which connects to database.
177    
178     <li> <i>alternative if you want to authorize users based on IP numbers,
179 dpavlin 1.2 client DNS names of HTTP Referrer header (URL from which they accessed
180 dpavlin 1.1 docman site)</i>
181     <br>Put <tt>$gblUsers = "htusers_header";</tt> in
182     <tt>realm/http_virtual_host.conf</tt> and use
183     following form in your <tt>realm/http_virtual_host.htusers</tt> file:
184     <pre>
185     REMOTE_ADDR=10.0.0.3:Full name:auth_header:e-mail@foo.bar
186     remote_hostname=myworkstation:Full name:auth_header:e-mail@foo.bar
187     http_referer=test.foo.bar:Full name:auth_header:e-mail@foo.bar
188     </pre>
189     Please note that you <b>have to</b> put <tt>auth_header</tt> in password
190     field and valid options in login field.
191     <br>Valid options for left side of equation (=) in login field are:
192     <tt>remote_addr</tt>, <tt>remote_hostname</tt> or <tt>http_referer</tt>.
193 dpavlin 1.2 Valid filed for right side are respective parameters for that option.
194 dpavlin 1.1
195 dpavlin 1.2 <li> <i>if you want some combination of above auth methods</i>
196 dpavlin 1.1 <br>Put in <tt>realm/http_virtual_host.conf</tt>:
197     <br><tt>$gblUsers = "htusers_union"</tt><br>
198     and uncomment which htusers auth modules you want to use and in which
199     order. It's enough for just one module to return success and user will
200     be allowed to login (so you can first check http_referer and then
201     htusers file if you want to).
202    
203     <a name="#trustee">
204     <li> <i>optional, but highly recommended</i>
205     Trustees are ACL implementation in docman. It's documented in
206     <a href="trustee.html">separate document</a>, and you should use it if your
207 dpavlin 1.2 users shouldn't have same right to all files under docman control, or
208 dpavlin 1.5 if you want to enable <a href="trustee.html#anonymous">anonymous
209     access</a> to repository.
210 dpavlin 1.1
211     <li> <i>optional</i> You can create file named <tt>.info.inc</tt> in
212     <tt>/home/httpd/repository</tt> directory for some kind of
213     <acronym title="message of the day">motd</acronym>
214 dpavlin 1.2 file. You can use html mark-up in it also!
215 dpavlin 1.4
216     <li> <i>optional</i>If you decided to use
217     <a href="admin.html#path_realm">script path as realm name</a>
218     correct all installation files according to
219     <a href="admin.html#path_realm_convert">this instructions</a>.
220 dpavlin 1.1
221     <li> if you want to <b>upload files which are bigger than 2Mb</b> increase
222     <tt>upload_max_filesize</tt> to more than 2Mb in <tt>php.ini</tt>.
223     If you still get errors on files bigger than 8Mb increase
224     <tt>post_max_size</tt> also.
225    
226     <li> <i>optional</i> Think about configuring your backup software so that
227 dpavlin 1.2 <tt>/home/httpd</tt> is backup ed automatically.
228 dpavlin 1.1
229     <li> <i>optional</i> You can use document manager behind secure http
230     server (<tt>https</tt>) simply by installing it. For information take a
231     look at <a href="http://www.modssl.org">http://www.modssl.org</a>
232     if you are using Apache 1.x or examine configuration options
233     for Apache 2.x.
234    
235 dpavlin 1.3 <a name="gblSeparateAdminMessages">
236     <li> <i>optional, after you are sure that configuration if correct</i>
237     You can separate administrative messages from errors which are
238     reported to users using
239     <tt>$gblSeparateAdminMessages = 1</tt>
240     in <tt>realm/http_virtual_host.conf</tt>. Error messages for you
241     will go to Apache Error log, and (if you also setup
242     <tt>$gblMailAdminMessages = 1</tt> to ServerAdmin from
243     <tt>apache.conf</tt>).
244    
245 dpavlin 1.1 </ol>
246    
247     <p><b>You are ready to go.</b></p>
248    
249     <p>
250     More info see: <a href="new_directory_layout.html">New Directory Layout</a>,
251     <a href="upgrade.html">How to Upgrade from v1.x</a>,
252 dpavlin 1.3 <a href="performance.html">Performance tips</a> and
253     <a href="admin.html">Administration manual</a>
254 dpavlin 1.1 </p>

  ViewVC Help
Powered by ViewVC 1.1.26