1 |
<h1>Installation instructions</h1> |
<h1>Installation instructions</h1> |
2 |
|
|
3 |
|
<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 |
<ol> |
<ol> |
9 |
<li>You will need <a href="http://www.apache.org/">Apache</a> web server |
<li>You will need <a href="http://www.apache.org/">Apache</a> web server |
10 |
(it should work with version 1.3 or 2.0, but it's not tested on 2.0) |
(it should work with version 1.3 or 2.0, but it's not tested with 2.0) |
11 |
and <a href="http://www.php.net/">php</a> version 4.x installed and |
and <a href="http://www.php.net/">php</a> version 4.x installed and |
12 |
configured for docman to work. |
configured for docman to work. |
13 |
<small><a href="faq.html#php3">related FAQ question</a></small> |
<small><a href="faq.html#php3">related FAQ question</a></small> |
14 |
<li>Get latest version of Document Manager from |
<li>Get latest version of Document Manager from |
15 |
<a href="http://www.rot13.org/~dpavlin/docman2.html"> |
<a href="http://www.rot13.org/~dpavlin/docman.html"> |
16 |
http://www.rot13.org/~dpavlin/docman2.html</a> |
http://www.rot13.org/~dpavlin/docman.html</a> |
17 |
|
|
18 |
<li>Go to installation directory (which <b>shouldn't be</b> under your web |
<li>Go to installation directory (which <b>shouldn't be</b> under your web |
19 |
server's DocumentRoot) and untar distribution |
server's DocumentRoot) and untar distribution |
21 |
cd /home/httpd |
cd /home/httpd |
22 |
tar xvfz docman-2*.tar.gz |
tar xvfz docman-2*.tar.gz |
23 |
</pre> |
</pre> |
24 |
|
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 |
If you decide to install docman in some other directory, change |
If you decide to install docman in some other directory, change |
30 |
<tt>$gblIncDir</tt> to that directory in <a href="#realm"> |
<tt>$gblIncDir</tt> to that directory in <a href="#realm"> |
31 |
<tt>realm/http_virtual_host.conf</tt></a>! |
<tt>realm/http_virtual_host.conf</tt></a>! |
32 |
|
<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 |
|
|
38 |
<li>Go to directory which you want to have under Document Manager control |
<li>Go to directory which you want to have under Document Manager control |
39 |
(this directory also shouldn't be accessable from your web server tree) |
(this directory also <b>shouldn't be</b> accessible from your web server |
40 |
|
tree) |
41 |
<pre> |
<pre> |
42 |
cd /home/httpd/repository |
cd /home/httpd/repository |
43 |
</pre> |
</pre> |
45 |
<pre> |
<pre> |
46 |
chown nobody /home/httpd/repository |
chown nobody /home/httpd/repository |
47 |
</pre> |
</pre> |
48 |
|
|
49 |
|
If you use <a href="http://www.debian.org/">Debian</a> you will want |
50 |
|
to use <tt>www-data</tt> user like this: |
51 |
|
<tt>chown www-data /home/httpd/repository</tt> |
52 |
|
|
53 |
<li>Make a symlink from that directory to file which will be directory index |
<li>Make a symlink from that directory to file which will be directory index |
54 |
<pre> |
<pre> |
55 |
ln -s /home/httpd/docman2/docman.php \ |
ln -s /home/httpd/docman2/docman.php \ |
67 |
<a name="docman_conf"> |
<a name="docman_conf"> |
68 |
<li>Copy docman <a href="upgrade.html#docman_conf">master configuration</a> |
<li>Copy docman <a href="upgrade.html#docman_conf">master configuration</a> |
69 |
file to <tt>/etc/docman.conf</tt>. If you |
file to <tt>/etc/docman.conf</tt>. If you |
70 |
want, you can change location of that file on top of <tt>docman.php</tt> |
want, you can change location of that file (so it's not in <tt>/etc</tt>) |
71 |
|
on top of <tt>docman.php</tt> |
72 |
but that will break automatic cvs update |
but that will break automatic cvs update |
73 |
<small>(see <a href="upgrade.html#cvs">upgrade via CVS</a>)</small> |
<small>(see <a href="upgrade.html#cvs">upgrade via CVS</a>)</small> |
74 |
<pre> |
<pre> |
75 |
cp /home/httpd/docman2/docman.conf /etc/docman.conf |
cp /home/httpd/docman2/docman.conf /etc/docman.conf |
76 |
</pre> |
</pre> |
77 |
You can also enter values for <tt>$fsRealmDir</tt> (normally |
If you haven't installed docman in <tt>/home/httpd/docman2</tt> change |
78 |
|
<tt>$gblIncDir</tt> to your installation directory. |
79 |
|
<br>You can also enter values for <tt>$fsRealmDir</tt> (normally |
80 |
set to <tt>$gblIncDir/realm</tt>) there (and to some location |
set to <tt>$gblIncDir/realm</tt>) there (and to some location |
81 |
which is not your docman installation). |
which is not your docman installation). |
82 |
|
|
98 |
to point to <tt>/home/httpd/http_virtual_host</tt>. |
to point to <tt>/home/httpd/http_virtual_host</tt>. |
99 |
|
|
100 |
<br>How to do that is beyond scope of this document. Please examine |
<br>How to do that is beyond scope of this document. Please examine |
101 |
<a href="http://www.apache.org">Apache documentation</a>. |
<a href="http://httpd.apache.org/docs-project/">Apache documentation</a>. |
102 |
|
|
103 |
<br>If you don't want to use virtual hosts for docman installation, your |
<br>If you don't want to use virtual hosts for docman installation, your |
104 |
realm will be called the same as ServerName. |
realm will be called the same as ServerName. |
115 |
DirectoryIndex index.html index.htm index.php |
DirectoryIndex index.html index.htm index.php |
116 |
</pre> |
</pre> |
117 |
|
|
118 |
|
<i>Hint!</i> |
119 |
|
|
120 |
|
You might want to include something like: |
121 |
|
<pre> |
122 |
|
<Directory /home/httpd/http_virtual_host> |
123 |
|
Options +FollowSymLinks |
124 |
|
</Directory> |
125 |
|
</pre> |
126 |
|
if you get error "Symbolic link not allowed" in Apache's <tt>error.log</tt>. |
127 |
|
|
128 |
<li><i>if you don't want to users in SQL database</i> |
<li><i>if you don't want to users in SQL database</i> |
129 |
Go to you web server <tt>http://http_virtual_host/</tt> and you should get |
Go to you web server <tt>http://http_virtual_host/</tt> and you should get |
130 |
autorization request. If you want to add <i>anonymous</i> access (without |
authorization request. If you want to add |
131 |
login and password) skip to <a href="#truestee">trustee</a> section. |
<a href="trustee.html#anonymous">anonymous access</a> (without |
132 |
|
login and password) skip to <a href="#trustee">trustee</a> section. |
133 |
|
|
134 |
<br>Edit <tt>realm/http_virtual_host/.htusers</tt> file to add users. |
<br>Edit <tt>realm/http_virtual_host.htusers</tt> file to add users. |
135 |
You can do that by calling <tt>adduser.pl</tt> script with name of |
You can do that by calling <tt>adduser.pl</tt> script with name of |
136 |
your htusers file like this: |
your htusers file like this: |
137 |
<pre> |
<pre> |
139 |
$ ./adduser.pl realm/http_virtual_host.conf |
$ ./adduser.pl realm/http_virtual_host.conf |
140 |
</pre> |
</pre> |
141 |
If you press just <i>enter</i> for password or enter <tt>auth_pop3</tt> |
If you press just <i>enter</i> for password or enter <tt>auth_pop3</tt> |
142 |
docman will uss e-mail address to connect to pop3 server and check |
docman will use e-mail address to connect to pop3 server and check |
143 |
password on it. For that e-mail address must be in following form: |
password on it. For that e-mail address must be in following form: |
144 |
<tt>pop3login@pop3server.mydomain</tt> |
<tt>pop3login@pop3server.mydomain</tt> |
145 |
|
|
159 |
anymore. This feature is not tested in version 2.0. Look out!</i></p> |
anymore. This feature is not tested in version 2.0. Look out!</i></p> |
160 |
|
|
161 |
<br>Download php-dbi class from |
<br>Download php-dbi class from |
162 |
<a href="http://pil.dk/downloads/dbi.tar.gz"> |
<a href="http://pil.dk/downloads/"> |
163 |
http://pil.dk/downloads/dbi.tar.gz</a> and |
http://pil.dk/downloads/dbi*.tar.gz</a> and |
164 |
untar it in docman's directory |
untar it in docman's directory |
165 |
<pre> |
<pre> |
166 |
cd /home/httpd/docman2 |
cd /home/httpd/docman2 |
191 |
are credentials for user which connects to database. |
are credentials for user which connects to database. |
192 |
|
|
193 |
<li> <i>alternative if you want to authorize users based on IP numbers, |
<li> <i>alternative if you want to authorize users based on IP numbers, |
194 |
client DNS names of HTTP Referarer header (URL from which they accessed |
client DNS names of HTTP Referrer header (URL from which they accessed |
195 |
docman site)</i> |
docman site)</i> |
196 |
<br>Put <tt>$gblUsers = "htusers_header";</tt> in |
<br>Put <tt>$gblUsers = "htusers_header";</tt> in |
197 |
<tt>realm/http_virtual_host.conf</tt> and use |
<tt>realm/http_virtual_host.conf</tt> and use |
205 |
field and valid options in login field. |
field and valid options in login field. |
206 |
<br>Valid options for left side of equation (=) in login field are: |
<br>Valid options for left side of equation (=) in login field are: |
207 |
<tt>remote_addr</tt>, <tt>remote_hostname</tt> or <tt>http_referer</tt>. |
<tt>remote_addr</tt>, <tt>remote_hostname</tt> or <tt>http_referer</tt>. |
208 |
Valid filed for right side are respective parametars for that option. |
Valid filed for right side are respective parameters for that option. |
209 |
|
|
210 |
<li> <i>if you want some combination of above authentification methods</i> |
<li> <i>if you want some combination of above auth methods</i> |
211 |
<br>Put in <tt>realm/http_virtual_host.conf</tt>: |
<br>Put in <tt>realm/http_virtual_host.conf</tt>: |
212 |
<br><tt>$gblUsers = "htusers_union"</tt><br> |
<br><tt>$gblUsers = "htusers_union"</tt><br> |
213 |
and uncomment which htusers auth modules you want to use and in which |
and uncomment which htusers auth modules you want to use and in which |
215 |
be allowed to login (so you can first check http_referer and then |
be allowed to login (so you can first check http_referer and then |
216 |
htusers file if you want to). |
htusers file if you want to). |
217 |
|
|
218 |
<a name="#trustee"> |
<a name="trustee"> |
219 |
<li> <i>optional, but highly recommended</i> |
<li> <i>optional, but highly recommended</i> |
220 |
Trustees are ACL implementation in docman. It's documented in |
Trustees are ACL implementation in docman. It's documented in |
221 |
<a href="trustee.html">separate document</a>, and you should use it if your |
<a href="trustee.html">separate document</a>, and you should use it if your |
222 |
users shouldn't have same right to all files under docman controll, or |
users shouldn't have same right to all files under docman control, or |
223 |
if you want to enable <i>anonymous</i> access to repository. |
if you want to enable <a href="trustee.html#anonymous">anonymous |
224 |
|
access</a> to repository. |
225 |
|
|
226 |
<li> <i>optional</i> You can create file named <tt>.info.inc</tt> in |
<li> <i>optional</i> You can create file named <tt>.info.inc</tt> in |
227 |
<tt>/home/httpd/repository</tt> directory for some kind of |
<tt>/home/httpd/repository</tt> directory for some kind of |
228 |
<acronym title="message of the day">motd</acronym> |
<acronym title="message of the day">motd</acronym> |
229 |
file. You can use html markup in it also! |
file. You can use html mark-up in it also! |
230 |
|
|
231 |
|
<li> <i>optional</i>If you decided to use |
232 |
|
<a href="admin.html#path_realm">script path as realm name</a> |
233 |
|
correct all installation files according to |
234 |
|
<a href="admin.html#path_realm_convert">this instructions</a>. |
235 |
|
|
236 |
<li> if you want to <b>upload files which are bigger than 2Mb</b> increase |
<li> if you want to <b>upload files which are bigger than 2Mb</b> increase |
237 |
<tt>upload_max_filesize</tt> to more than 2Mb in <tt>php.ini</tt>. |
<tt>upload_max_filesize</tt> to more than 2Mb in <tt>php.ini</tt>. |
239 |
<tt>post_max_size</tt> also. |
<tt>post_max_size</tt> also. |
240 |
|
|
241 |
<li> <i>optional</i> Think about configuring your backup software so that |
<li> <i>optional</i> Think about configuring your backup software so that |
242 |
<tt>/home/httpd</tt> is backuped automatically. |
<tt>/home/httpd</tt> is backup ed automatically. |
243 |
|
|
244 |
<li> <i>optional</i> You can use document manager behind secure http |
<li> <i>optional</i> You can use document manager behind secure http |
245 |
server (<tt>https</tt>) simply by installing it. For information take a |
server (<tt>https</tt>) simply by installing it. For information take a |
247 |
if you are using Apache 1.x or examine configuration options |
if you are using Apache 1.x or examine configuration options |
248 |
for Apache 2.x. |
for Apache 2.x. |
249 |
|
|
250 |
|
<a name="gblSeparateAdminMessages"> |
251 |
|
<li> <i>optional, after you are sure that configuration if correct</i> |
252 |
|
You can separate administrative messages from errors which are |
253 |
|
reported to users using |
254 |
|
<tt>$gblSeparateAdminMessages = 1</tt> |
255 |
|
in <tt>realm/http_virtual_host.conf</tt>. Error messages for you |
256 |
|
will go to Apache Error log, and (if you also setup |
257 |
|
<tt>$gblMailAdminMessages = 1</tt> to ServerAdmin from |
258 |
|
<tt>apache.conf</tt>). |
259 |
|
|
260 |
</ol> |
</ol> |
261 |
|
|
262 |
<p><b>You are ready to go.</b></p> |
<p><b>You are ready to go.</b></p> |
264 |
<p> |
<p> |
265 |
More info see: <a href="new_directory_layout.html">New Directory Layout</a>, |
More info see: <a href="new_directory_layout.html">New Directory Layout</a>, |
266 |
<a href="upgrade.html">How to Upgrade from v1.x</a>, |
<a href="upgrade.html">How to Upgrade from v1.x</a>, |
267 |
<a href="performance.html">Performance tips</a> |
<a href="performance.html">Performance tips</a> and |
268 |
|
<a href="admin.html">Administration manual</a> |
269 |
</p> |
</p> |