Installation Guide - Version 1.0

From DocMGR

Jump to: navigation, search

Contents

[edit] Requirements

[edit] Server

  • PHP 5.2 or later compiled with --enable-zip, --enable-mbstring, and --with-pgsql options (or loaded as modules)
  • Postgresql 8.4 or later
  • Imagemagick
  • libtiff
  • xpdf
  • OpenOffice.org-3.0 or later
  • rewrite support should be compiled into the apache server for optimal webdav support. "--enable-rewrite"

[edit] Client

The interface is heavy in javascript, so Internet Explorer 7, Firefox 2.0, or Safari 4 or later are required. Editing Microsoft Office documents in the browser requires Internet Explorer with activex enabled.

[edit] Installation Procedure

[edit] Setup the server

This is sort of out of the scope of this document. But I'm going to include some quick installation instructions if you were compiling from source. In this order:

  • Install Postgresql 8.4.x
    • create a user postgres
    • Download source and decompress with tar -jxf postgres-8.4.x.tar.bz2)
    • compile:
      • cd postgres-8.4.x
      • ./configure --prefix=/usr/local/pgsql
      • make; make install
    • Setup
      • cd /usr/local
      • chown -R postgres pgsql
      • cd pgsql
      • su postgres
      • bin/initdb -D data
    • Run
      • /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -o '-i'
  • Install apache
    • Download source and decompress with tar-jxf httpd-2.2.x.tar.bz2
    • compile
      • cd httpd-2.2.x
      • ./configure --prefix=/usr/local/apache;
      • make; make install
  • Install php
    • Download source and decompress with tar -zxf php-5.2.x.tar.gz
    • compile
      • cd php-5.2.x
      • ./configure --with-apxs2=/usr/local/apache/bin/apxs --with-pgsql --enable-zip --enable-mbstring
      • make; make install
    • Setup
    • ln -s /usr/local/bin/php /usr/bin

[edit] Setting up OpenOffice.org

  • Download the latest version of openoffice and install it on the server. Openoffice must have python-uno bindings. So, if your distro includes these in a separate package, be sure to instal them.
  • Test openoffice by going into the scripts/ directory and run "php test-oo.php". If all is successful, there will be a test.pdf file in the scripts directory. Make sure scripts dir is writable by whatever user apache runs as
  • run "killall soffice.bin" to stop the running server process. This is because the test script will probably run as a different user from whatever apache runs as. Then subsequent attempts by apache won't work

[edit] Setup the files

  • Read the wizard notes below before proceeding!!!!!!!!!!!!!!!
  • Create a new database for docmgr in postgresql.
  • Untar the DocMGR archive
  • Chown the docmgr/ directory to the user your apache process runs as. By default, on most linux distributions, apache 2.2 runs as the user "daemon". So, just type "chown -R daemon /www/docmgr".
  • Point your browser to the DocMGR installation. Follow the prompts on the installation wizard. Be sure to use the database you created above for your DocMGR database.

[edit] Wizard Notes

  • Even though the wizard does import your current settings into the new config file, please backup your config directory first before upgrading.
  • The wizard will automatically upgrade the database for version RC8. Any other versions of DocMGR must be upgraded to RC8 before the wizard will handle it correctly.
  • If you ever need to run the wizard again, remove the "return false;" line at the top of install/install.php

[edit] Post-wizard setup

There are additional options in the config/config.php file which the wizard does not address. Please be sure to browse through them and tweak as necessary.

DocMGR now allows you to move the "files/" directory to a location not accessible from the web. This allows the storage of data on a separate drive/partition, or just in a location out of apache's reach.

If you leave the "files/" directory in the default location, or in a web-accessible location, be sure to perform the httpd.conf modification below. To not do so will allow anyone to download files stored in DocMGR!. In your apache httpd.conf file, add the following lines:

<Files "*.docmgr">
  Order allow,deny
  Deny from all
</Files>

This prevents anyone from pointing their browser to your "files/data/" or "files/thumbnails/" directories and freely downloading files from the application.

[edit] First Time Login Username & Password

If this is a new installation, you can login now with the username/password combo admin/admin. After you log in you may want to head over to Admin -> Database Admin -> External Applications to see if DocMGR is finding the external apps you installed (if any). If it can't find a particular program, it will tell you. It will also report which directories it is looking in for that program's binary files.

[edit] Upgrading

Note: If you are upgrading from 0.58, please view the upgrade58.php file in the scripts/ directory. It has instructions in the top on how to proceed. Otherwise, follow below:

  • Backup your current installation and database
  • Download DocMGR and extract it into a temporary directory
  • Copy the extract contents over top of your existing installation. Make sure the new docmgr files are still owned by your apache user. (I.E. "chown -R daemon /www/docmgr")
  • If you are using a version prior to RC8, use the upgrade.php script in the scripts/ directory to upgrade to RC8. You'll want to edit the file before running to pick which version you are upgrading from. Upgrading versions prior to 1.0 RC1 aren't supported quite yet.
  • Point your browser to the DocMGR installation and follow the wizard installation steps

[edit] The Scripts Directory

Once you're done with the install, you'll probably want to put the scripts/ directory somewhere not accessible via the web. But, hang on to it in case you need something in it for later

[edit] Image OCR

If you want the content of your images to be indexed so you can look up a scanned page (or whatever) by its content, then you will need this. By default, DocMGR is setup to use OCRAD at http://www.gnu.org/software/ocrad/ocrad.html, ImageMagick at http://www.imagemagick.org, and LibTiff at http://www.remotesensing.org/libtiff/ to work properly. You probably already have imagemagick and libtiff installed on your system. Drop to a command prompt and type 'convert' for imagemagick, and 'tiffinfo' for libtiff, and see what you get. If you don't have them, you can download the packages from the url above. For DocMGR to enable OCR support, it needs to be able to find the ocrad, mogrify, convert, tiffinfo, and tiffsplit binaries. So, they must be in apache's path.

[edit] PDF Indexing

This will allow your pdf file content to be indexed. You can get XPDF from http://www.foolabs.com/xpdf/. XPDF requires version 3.0 or later.

To use xpdf, make sure the pdftotext, pdfimages, and pdftoppm binaries are in apache's path. They are probably in /usr/X11R6/bin by default. If you want to index encapsulated pdfs as well (like the one's from a copier), you'll need to follow the above steps for OCR support as well.

[edit] Thumbnail Support

Like Image OCR, thumbnail support requires imagemagick and libtiff to work properly. See above for the packages' home pages.

[edit] Email Support

You can now email files to any email address. You may also receive subscription notifications via email. You can use these features if sendmail is installed and running on your system.

[edit] URL Indexing

DocMGR can index any urls you link to. This will be enabled if you have "wget" installed on your system.

[edit] Zip And Download Collection

You can download a zipped version of any collection. The utility "zip" must be installed on your system.

[edit] ClamAV File Scanning

If clamav is installed on your system, DocMGR will use it to scan files for viruses at upload, import, view, checkin/checkout, and email. If a virus is found, the virus will be reported, and the action will be cancelled. DocMGR looks for the "clamscan" binary to enable this feature. ClamAV may be downloaded from http://www.clamav.net.

[edit] Keywords

Keywords have been completely redone. You can setup keywords in Admin -> Keyword Admin. They make either be text entry or selected from a list of options. They may also be limited to certain collections within the system. More keyword types will be coming.

[edit] WebDAV

WebDAV has been implemented using the SabreDAV php webdav library. Please take the time to read the notes below regarding installation.

[edit] Notes

  • WebDAV uses HTTP Digest authentication. Your webdav client must support that for it to work.
  • If you are upgrading, any existing user must reset their password before they can login. This is so the password will be restored in a digest-compatible format.
  • Windows works best if you give the webdav server its own domain so the script exists at the root. For example: http://webdav.mydomain.org/ instead of http://docmgr.mydomain.org/webdav.php/. See below for detailed instructions.

[edit] To setup in its own domain

  • Add the new domain to your dns server. We'll use "webdav.docmgr.org"
  • Add a new httpd-vhosts.conf entry:
 <VirtualHost *:80>
 DocumentRoot "/www/docmgr"
 ServerName webdav.mydomain.com
 ServerAdmin elawman@eastwestp.com
 ErrorLog /usr/local/apache/logs/webdav-error_log
 TransferLog /usr/local/apache/logs/webdav-access_log
 RewriteEngine On
 RewriteRule ^/(.*)$ /webdav.php [L]
 RewriteLog      /usr/local/apache/logs/webdav-rewrite.log
 RewriteLogLevel 0
 </VirtualHost>
  • Restart apache.
  • Point your web browser to http://webdav.mydomain.com/. It should work using the SabreDAV browser plugin. If all checks out, then proceed to setup your client software.

[edit] Without a reserved domain

  • Edit the webdav.php and set the baseUri variable to "/webdav.php". Remember, this is not an optimal setup and it is not thoroughly tested.

[edit] Clients

Please take the time to check out the notes regarding clients on SabreDAV's website. I've had the best luck with Visa and Win 7 clients. Finder on OS X works as well. However, it is quite slow. This is because Finder creates a myriad of resource files, and does lots of checking for these files. DocMGR allows these files to be created, but creates them as hidden objects so as to not clutter up the browse list.

http://code.google.com/p/sabredav/wiki/Windows

http://code.google.com/p/sabredav/wiki/Finder