Instal.lació de la 2.1.3 a Ubuntu 14.04

De Gwiki
Revisió de 11:48, 6 ago 2015; Admin (Discussió | contribucions)

(dif) ←Versió més antiga | Versió actual (dif) | Versió més nova→ (dif)
Dreceres ràpides: navegació, cerca

Partim del punt en el que ja tenim instal.lat apache i php en el nostre server. A continuació fem la instal.lació de postgres

  sudo apt-get install postgresql 

By default, postgreSql creates a user and a database called postgres: the default security assumes that the postgres user will only be accessible to those who need access.

For now, log into the postgres user like this ( Ho hem de fer des de l'usuari root)

su - postgres
createuser userdb
createdb docmgrbase

Oss.: userdb/docmgrbase will be the user/database that DocMgr will be using in PostreSql.

Now we have to create a MD5 password for userdb and grant full permission on database docmgrbase.

psql
alter user userdb with encrypted password '<very strong password>';
grant all privileges on database docmgrbase to userdb;

MD5 authentication requires the client to supply an MD5-encrypted password for authentication. To do that, edit /etc/postgresql/9.3/main/pg_hba.conf file.

Add or Modify the lines as shown below [...]

  1. TYPE DATABASE USER ADDRESS METHOD
  2. "local" is for Unix domain socket connections only

local all all md5

  1. IPv4 local connections:

host all all 127.0.0.1/32 md5

  1. IPv6 local connections:

host all all  ::1/128 md5 [...]

Restart postgresql service to apply the changes:

  sudo service postgresql restart

You can check if all works fine using the next

psql -U userdb docmgrbase
password: <very strong password>

To exit: \q

S'han d'instal.lar llibreries de php

  sudo apt-get install php-cli php-pgsql php-imap 
  sudo service apache2 restart

DocMgr

Now we can install the docmgr files in /var/www/html. Download docmgr-2.1.3.tar and copy it in /var/www/html.

cd /var/www/html
tar -xvf docmgr*
chown -R apache:apache /var/www/html/docmgr/

Now point your browser to the DocMGR installation (http:///docmgr): follow the prompts on the installation wizard.

Database Host: localhost
Database User: userdb
Database Password: 
Database Port: 5432
Database Name: docmgrbase
Full site path: /var/www/html/docmgr

Att.: If you want to restart the installation wizard you have to edit the file /var/www/html/docmr/install/install.php, and comment the “return false” line at the top of the file.

Accept all default parameters and at the end of the installation wizard it is possible enter in docmgr with the account user admin and password admin.

Now we have to modify one file: in the next rev of docmgr all be will included in the “trunk” version, but now we have to modify manually the php code.

nano /var/www/html/docmgr/bin/fileconvert.php

Remove all the code and replace with the below.

<!--?php

include("config/app-config.php");
$ooHome = "/tmp";
$path_parts = pathinfo($argv[2]);
$ext=pathinfo($argv[2],PATHINFO_EXTENSION);
$dirname=pathinfo($argv[2],PATHINFO_DIRNAME);

$cmd = "export HOME='".$ooHome."';/usr/bin/libreoffice --headless --convert-to ".$ext." ".$argv[1]." --outdir ".$dirname;

//run it
$res = `$cmd`;
echo $res;

Final Requirements

apt-get install zip unzip enscript libtiff-tools wget poppler-utils poppler* ImageMagick*

Install ocrad

Indicacions per centos

wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
rpm -Uvh rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm
yum update
yum install lzip gcc*

Download from http://www.gnu.org/software/ocrad/ocrad.html

tar -xvf ocrad-0.25.tar.lz
cd ocrad-0.25
./configure
make
make install