/[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

Contents of /doc/install.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Thu Jul 25 21:11:51 2002 UTC (21 years, 9 months ago) by dpavlin
Branch: MAIN
Changes since 1.1: +9 -9 lines
File MIME type: text/html
spell check

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

  ViewVC Help
Powered by ViewVC 1.1.26