HOW-TO - DocMGR 

Contribued by tjkushner 
 
This how to uses DocMgr 0.49.1  
 
Packages you will need: 
 
gocr-0.39.tar.gz  
httpd-2.0.52.tar.gz 
xpdf-3.00pl2-linux.tar.gz 
tiff-3.7.1.tar.gz 
php-4.3.10.tar.gz 
postgresql-7.4.6.tar.gz 
docmgr-0.49.2.tar.gz 
 
 
Create Basic Server Installation(Fedora Core 1) 
 
Step 1 - Boot to CD. 
 
Step 2 - Choose Installation type - custom 
 
Step 3 - Disk partitioning 
1. Choose Automatically partition. 
2. Choose remove all partitions (if there are any.) 
 
Step 4 - Boot loader configuration. 
1. Use GRUB 
2. No boot loader password. 
 
Step 5 - Configure Network Devices 
1. Edit IP Settings - For a server, turn off DHCP and manually enter appropriate IP settings 
2. Set the hostname  
a. Check Manually and enter server01 (or whatever is appropriate) 
 
Step 6 - Firewall Configuration 
1. No Firewall 
 
Step 7 - Set the root password 
1. Set it to password 
 
Step 8 - Package Group Selection 
Desktops 
1. X-windows (use defaults) 
2. GNOME (use defaults) 
Applications 
1. Editors - Install Emacs, Xemacs, and vim-enhanced 
2. Graphical Internet - Install mozilla and evolution 
3. Office Productivity - Install openoffice.org and gpdf 
Servers 
1. Windows File Server (if applicable) 
2. Network Servers - Install vnc-server 
Development 
1. Development tools - Install just the base packages 
2. Kernel Development - Install just the base packages 
System 
1. Administration tools - Uncheck redhat-config-kickstart, redhat-config-language, and redhat-config-soundcard. Install all other packages. 
2. System tools - Install ethereal, ethereal-gnome, tsclient, rdesktop, nmap-frontend, nmap, samba-client, screen, and vnc  
3. Printing support - Install cups and hpijs 
 
Step 9 - Create Boot Disk - NO 
 
Step 10 - Create User Account 
1. Username: username 
2. Full Name: full username 
3. Password: password 
 
 
Install ImageMagick 
1. yum install ImageMagick 
 
Install GOCR 
1. Obtain latest gzip version 
2. tar xzvf gocr-x.xx.tar.gz 
3. cd gocr-x.xx 
4. ./configure 
5. make 
6. make install 
 
Install PostgreSQL 
1. Obtain latest gzip version 
2. tar xzvf postgresql-x.x.x.tar.gz 
3. cd postgresql-x.x.x 
4. ./configure 
5. gmake 
6. gmake install 
7. adduser postgres 
8. passwd postgres (set to same as root password) 
9. mkdir /usr/local/pgsql/data 
10. chown postgres /usr/local/pgsql/data 
11. su - postgres  
12. /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data 
13. /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data >logfile 2>&1& (Take note of spaces) 
14. /usr/local/pgsql/bin/createdb docmgrdb (skip if rebuilding) 
15. exit (switch back to root) 
16. Switch back to root - type "exit"  
17. Add the following line to /etc/rc.local 
su -c '/usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data' postgres 
16. Modify /usr/local/pgsql/data/postgresql.conf and uncomment the following lines: 
port = 5432 
tcpip_socket = true  
 
Install Apache 
1. tar xzvf httpd-2.0.NN.tar.gz 
2. cd httpd-2.0.NN 
3. ./configure 
4. make 
5. make install 
6. cd /usr/local/apache2 
7. Modify /usr/local/apache2/conf/httpd.conf as necessary 
8. ./bin/apachectl start 
9. Modify /etc/rc.local to include "/usr/local/apache2/bin/apachectl start"
10. Modify the httpd.conf file and add the following lines: 
<FILES *.docmgr> 
Order allow,deny 
Deny from all 
</FILES> 
 
Install PHP 
 
1. tar -xvzf php-VERSION.tar.gz 
2. cd php-VERSION 
3. ./configure --prefix=/usr/local/php --with-pgsql --with-apxs2=/usr/local/apache2/bin/apxs 
4. make 
5. make install 
6. cp php.ini-dist /usr/local/php/lib/php.ini 
7. cd /usr/local/apache2/conf 
8. Edit the httpd.conf file to include the following lines in the appropriate areas: 
LoadModule php4_module modules/libphp4.so 
AddType application/x-httpd-php .php .phtml .html 
AddType application/x-httpd-php-source .phps 
9. /usr/local/apache2/bin/apachectl stop 
10. /usr/local/apache2ctl start 
11. cat /usr/local/apache2/logs/error_log  
12. Verify the last line should indicate that PHP is configured 
13. Modify /usr/local/php/lib/php.ini and change the following line: 
upload_max_filesize = 150M 
 
Install Tiff 
1. Obtain tiff-3.7.1.tar.gz 
2.tar -xzvf tiff-3.7.1.tar.gz 
3. cd tiff-3.7.1 
4. ./configure 
4. make 
5. make install 
6.Type tiffinfo to verify installation 
 
Install XPDF 
1. Obtain xpdf-3.00pl2-linux.tar.gz 
2. tar -xzvf xpdf-3.00pl2-linux.tar.gz 
3. cd xpdf-3.00pl2-linux 
4. ./configure 
5. make 
6. make install 
7. Type xpdf to verify installation xpdf GUI window will pop up 
 
***Important 
Make sure these files are in /usr/bin copy or create sym links for them but they have to be accessible to apache . They should be executable for the
"nobody" user. 
convert  
mogrify  
montage 
tiffsplit  
tiffinfo 
pdftotext  
pdfimages  
pdftoppm 
gocr  
enscript  
gs 
 
Install DocMGR 
1. Obtain the lastest gzip version 
2. tar xzvf docmgr-x.xx.tar.gz 
3. cd /usr/local/apache2/htdocs 
4. mkdir doc  
5. cd doc 
6. cp -R /download/doc/* . 
7. Modify config/config.inc.php as appropriate 
8. mkdir /home/samba/docmgr/import 
9. su postgres 
10. cd /usr/local/pgsql/bin 
11. ./psql -d docmgrdb -f/usr/local/apache2/htdocs/doc/scripts/docmgr.pgsql 
12. exit 
13. cd /usr/local/apache2/htdocs/doc 
14. chmod -R 777 data 
15. chmod -R 777 temp 
16. chown nobody thumbnails 
 
Install Tsearch2 
1. cd /download/postgres-x.x.x/contrib/tsearch2 
2. make 
3. make install 
4. su postgres  
5. cd /usr/local/pgsql/bin 
6. ./pg_ctl stop -D /usr/local/pgsql/data 
7. ./pg_ctl start -D /usr/local/pgsql/data 
8. ./psql -d docmgrdb -f/usr/local/apache2/htdocs/doc/scripts/docmgr-tsearch2.sql 
9. Modify /usr/local/apache2/htdocs/doc/include/config.inc.php to uncomment the following line: 
define("TSEARCH2_INDEX","1");