queFX is a web based Intelligent Character Recognition(ICR) software. queFX can be used as a Computer Assisted Data Entry(CADE) tool. It is written in PHP and uses MySQL as backend. In this document I am going to install queXF in an Ubuntu 12.04 box. We will need Apache, PHP, MySQL, ADOdb and Ghostscript.
Install Apache
# apt-get install apache2
Install MySQL
# apt-get install mysql-server
Install PHP5 and required extensions
# apt-get install php5 php5-gd php5-mysql
Install Ghostscript
# apt-get install ghostscript
Download and extract ADOdb from http://sourceforge.net/projects/adodb/files/adodb-php5-only/adodb-518-for-php5/
# unzip adodb518a.zip
Copy the extracted directory into some location
# cp -r adodb5 /usr/local/
Change post_max_size to 10MB, upload_max_filesize to 10MB and memory_limit to 128MB in PHP configuration file
# pico /etc/php5/apache2/php.ini
Download queXF from http://sourceforge.net/projects/quexf/files/quexf/quexf-1.13.5/
Extract the zip file
# unzip quexf-1.13.5.zip
Copy the extracted files into Apache’s document root directory
# cd quexf-1.13.5/
# cp -rf * /var/www/
Change the owner of the files from current user
# chown -R www-data:www-data *
We need to enable user authentication in Apache.
Create a password file for Apache and store this file is in some safe location (somewhere not accessible from the web).
# mkdir -p /usr/local/apache/passwd
# htpasswd -c /usr/local/apache/passwd/passwords pranabs
Add more user using the same command but without –c option, otherwise it will overwrite the file and previously created users:
# htpasswd /usr/local/apache/passwd/passwords ajitj
My apache config file for default site looks like
# cat /etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
Create .htaccess file in the queFX root directory
#pico /var/www/.htaccess
and add the following content:
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /usr/local/apache/passwd/passwords
Require valid-user
Restart Apache
# service apache2 restart
Create MySQL database and user
mysql> create database quexf;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on quexf.* to 'quexf'@'localhost' identified by 'quexf';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Import the quexf database script provided inside the database folder inside quexf application directory.
# mysql -u quexf -pquexf quexf < /var/www/database/quexf.sql
Change the queXF configuration file, set the database connection details and path for ADOdb and Ghostscript
# pico /var/www/config.inc.php
To test the configuration, open the link (http://servername/admin/?page=testconfig.php)
Example:
http://192.168.10.179/admin/?page=testconfig.php
You will be asked for username and password.
Enter user login that we created with htpasswd command. If configuration is fine, we will see the Passed Configuration Test message:
That’s it, our queXF installation is ready .
6 comments:
hi
I am live in Cambodia
I want to change htaccess but i don't know to change it.
Please, help me
.htaccess is a hidden file. So you will not see it using normal ls command. You can use any text editor to change the file, if .htaccess does not exists, then you can create it.
would you please tell me the steps to install it on windows? I can't install it from the explaination given in the official webpage, I need it to proccess 600 form for a university research work to get my degree
How to do it on Windows OS?
Post a Comment