CentOS5 Installation

From DocMGR

Revision as of 18:44, 15 June 2010 by 173.203.215.116 (Talk)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

[edit] CentOS5 DocMgr Installation

CentOS is a Red Hat Enterprise Linux Clone and a good choice for deploying in a production environment due to the slower pace of change. You will need to download several packages that are outside the yum repositories of CentOS, however.

The following tutorial is written from a total newbie perspective. If you have extensive *Nix experience you can just follow Eric Lawman’s Installation Instructions.

Install CentOS and check the desktop and server installations. Optionally select server gui.
You might find it easier to use Gnome as the terminal interface....

Disable the firewall and SeLinux. Add a normal user, set up NTP for the time and date synchronization.

Run “yum update” from a terminal and refresh all packages installed.

# yum update

*Note: You may have to stop the yum daemon from running before you can run yum from the command line. To do this go to the System Menu >> Administration >> Server Settings >> Services and highlight yum-updatesd and click the stop button. You can also go to the command prompt

# service yum-updatesd stop

Alternatively, you can just let the yum updates daemon run in the background. it’s kind of like Windows Automatic Updates.

[edit] Check Installed Packages

You can check to see what packages are installed using rpm

# rpm –q <package name> 

or you can query to see if the yum repository has the packages you need

# yum search <package name>

[edit] Install CentOS REPO Packages

Install postgresql-server

# yum install postgresql-server

postgresql

# yum install postgresql

postgresql-contrib

# yum install postgresql-contrib

php-pgsql

# yum install php-pgsql

ImageMagick

# yum install ImageMagick

xpdf (this package has been replaced by poppler-pdf so you’ll need to grab this from http://rpmfind.net as poppler doesn’t support some functions in DocMgr.) Download the Fedora Core 4 package and install it with the package installer gui or the rpm command line utility.

If you get a dependencies failed error message, install the missing packages using "yum install". Trying to install the dependencies with "rpm -i" can take lots of time and effort.

Easiest way to do this is to add the dag wiers repo to your yum config (see below); once done you can use this to get xpdf on your system

 yum install t1lib openmotif libpaper poppler-utils xdg-utils

afterwards install the xpdf rpm

[edit] Set up outside RPM REPOS

Setting up the Dag Wieers repo is pretty straight forward. Navigate to /etc/yum.conf and open it up in the text editor. At the bottom of the file under "Add your REPO’s here" add

[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

and save the file. The next time you run the yum command it will also search the Dag Wieers repository. You will also be able to auto get the dependencies for the rpm packages you download from Dag’s repo.

If you get a key not found error message, import Dag Wieer's key using rpm --import RPM-GPG-KEY.dag.txt. If this fails, disable gpgcheck by changing the value in yum.conf.

[edit] Install Packages from Dag Wieers REPO

Install gocr

# yum install gocr

Install AntiWord

# yum install antiword

Install ClamAV Daemon

# yum install clamd

(if you install and run the full clamAV package it will take upwords of 30 seconds for clamscan to virus scan the files you want to open, a job clamdscan does in seconds).

[edit] Remove Sendmail

Next we are going to remove sendmail and install postfix for email purposes. Sendmail is a bear to configure although those with more experience than I can probably get it going rather quickly. Postfix is another MTA which works well and is easy to install and configure.

Remove sendmail

# yum remove sendmail

Install Postfix

# yum install postfix

[edit] Download DocMGR

Download the latest DocMgr build from the DocMgr website http://www.docmgr.org Extract the files into the /var/www/html/ directory. If this will be the only website on this server you can dump the whole contents into the html directory, otherwise make a folder like/docmgr for your files. I usually extract the files into the /tmp directory and then you can copy the files over to the /var/www/html/ directory. You want to copy everything in the “doc” folder.

[edit] Set up PostgreSQL

Set up postgresql First we need to initialize the db

#su postgres
bash-3.1$ initdb /var/lib/pgsql/data/
# su
password: (Enter root password)
# service postgresql start

Then we need edit the postgresql.conf file found in /var/lib/pgsql/data/ uncomment the following lines:

port = 5432
password_encryption = on

Save and close

JaKZhs <a href="http://zzmopgboinqj.com/">zzmopgboinqj</a>, [url=http://xtdqdpdymyuy.com/]xtdqdpdymyuy[/url], [link=http://hgqfsmycarrs.com/]hgqfsmycarrs[/link], http://wrlboiboyyja.com/

[edit] Create the Database and DocMgr user

To create the DB and docmgr user

# su postgres

As the postgres user do the following:

bash-3.1$ createuser docmgr
Shall the new role be a superuser? (y/n) y
CREATE ROLE
bash-3.1$ psql template1
Welcome to psql 8.1.9, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

template1=# ALTER USER docmgr password 'yourpasswordhere';
ALTER USER
template1=# \q
bash-3.1$ createdb -h localhost -W -U docmgr docmgr
Password: 
CREATE DATABASE

[edit] Populate the DocMgr Database with the included script

Change to the DocMgr /scripts directory
# cd /var/www/html/scripts
# perl -p -i -e s/postgres/docmgr/s docmgr.pgsql
# psql -h localhost -W -U docmgr -d docmgr -f docmgr.pgsql
Password: <enter docmgr password here>
SET
REVOKE
GRANT
SET
CREATE SEQUENCE
...
Lots of Statements ommitted
...
CREATE TABLE

[edit] Restrict DocMgr User

Restricting the user docmgr

# su postgres
bash-3.1$ psql template1
Welcome to psql 8.1.9, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

template1=# alter user docmgr NOCREATEUSER NOCREATEDB;
ALTER USER
template1=# \q

[edit] Change config.php file

You’ll need to make the necessary changes in the config.php file in

/var/www/html/config/config.php
Edit the database connection info to include the docmgr user and password and 
connection to the docmgr db on localhost.

If you want to integrate this into a Windows Active Directory Network you’ll need to get the latest SAMBA Server. I will create a SAMBA HOWTO with DocMgr shortly and add it here.

There is an /import directory you can set up as well. That way you can have users scan to this directory and do a massive import into the system. This works great for accounting departments that need to get tons of invoices into the system at one time. The setting for that is right under the DB setup in the config.php file.

You should now have a basic working edition of DocMgr. Open up Firefox on the DocMgr computer and and point it to http://localhost and login and begin setting up the docmgr.