Changes

Jump to navigation Jump to search
5,689 bytes removed ,  17:05, 2 May 2015
Line 1: Line 1: −
Also see [[Product Opener Installation]]
+
This project aims to collect information about Fast Food Products. Most of Fast Food products don't have a barcode. This page aims to find whether the information is published in bulk online (and what is published) so that we can add it to OpenFoodFacts.
   −
This page lists all the steps necessary to install Product Opener on Debian, including a development environment.
+
=== A&W Restaurants ===
 +
=== Arby's ===
 +
=== Bojangles' ===
 +
=== Brioche Dorée ===
 +
=== Burger King ===
 +
=== Café de Coral ===
 +
=== Carl's Jr. ===
 +
=== Charley's Grilled Subs ===
 +
=== Checkers ===
 +
=== Rally's ===
 +
=== Chester's International ===
 +
===Chick-fil-A ===
 +
=== Chicken Cottage ===
 +
=== Chicken Delight ===
 +
<!--*[[Chicken Express === not INTL-->
 +
=== Chicken Licken (restaurant)|Chicken Licken ===
 +
=== Chipotle Mexican Grill ===
 +
=== Chowking ===
 +
=== Church's Chicken ==={{\}} [[Texas Chicken ===
 +
<!--*[[Cook Out (restaurant)|Cook Out === not INTL-->
 +
<!--*[[Culver's === not INTL-->
 +
=== Dairy Queen ===
 +
<!--*[[Del Taco === not INTL-->
 +
=== Dunkin' Donuts ===
 +
=== El Pollo Loco ===
 +
=== Fatburger ===
 +
=== Graceland ===
 +
<!--*[[Firehouse Subs === not INTL, PR is part of USA-->
 +
=== Five Guys ===
 +
<!--*[[Guthrie's === not INTL-->
 +
=== Hardee's ==={{\}} [[Red Burrito ===
 +
=== Hesburger ===
 +
<!--*[[In-N-Out Burger === not INTL-->
 +
=== Jack in the Box ===
 +
=== Jollibee ===
 +
=== Kenny Rogers Roasters ===
 +
=== KFC ===
 +
=== Krystal (restaurant)|Krystal ===
 +
=== Kyochon ===
 +
=== Long John Silver's ===
 +
=== Lotteria ===
 +
=== Maoz Vegetarian ===
 +
=== Marrybrown ===
 +
=== McDonald's ===
 +
=== Moe's Southwest Grill ===
   −
All instructions below are for user "stephane", please use your own name. :-)
+
=== MOS Burger ===
 
+
=== Nando's ===
== Open Food Facts test / development server ==
+
=== Nathan's Famous ===
 
+
=== New York Fries ===
OFF test / development server is a small dedicated server ("kimsufi 2G", the cheap sub-brand of OVH).
+
=== Noble Roman's ===
 
+
=== Panda Express ===
* Linux ks3095298.kimsufi.com 3.10.23-xxxx-std-ipv6-64 #1 SMP Tue Mar 18 14:48:24 CET 2014 x86_64 GNU/Linux
+
=== Paul (bakery)|Paul ===
* CPU: Intel(R) Atom(TM) CPU 230 @ 1.60GHz - Cores: 2 - Cache: 512KB
+
=== Pizza Hut ===
* RAM: 2 Gb
+
=== Pollo Tropical ===
* Disk: 1 Tb
+
=== Popeyes Chicken & Biscuits ===
 
+
=== Quick (restaurant chain)|Quick ===
== Debian install ==
+
=== Quiznos ===
 
+
=== Raising Cane's Chicken Fingers ===
Fresh Debian install with OVH / kimsufi install process:
+
=== Red Rooster ===
 
+
=== Roy Rogers Restaurants ===
* Step 1:
+
=== Smoothie King ===<!--
** OS - Type: Basic
+
=== Sonic Drive-In === DO NOT ADD, IT'S ONLY IN THE USA, NOT INTL -->
** Debian 7.5 stable (Wheezy) - debian 7 - 64 bits
+
=== Subway (restaurant)|Subway ===
* Step 3: Partitions
+
=== Taco Bell ===
** Default:
+
=== Taco Bueno ===
*** / ext4 20 Gb
+
=== Taco Cabana ===
*** /home/ ext4 979.5 Gb
+
=== Taco del Mar ===
*** swap 1 x 512 Mb
+
=== Taco John's ===
 
+
=== Taco Mayo ===
== DNS ==
+
=== Taco Tico ===
 
+
=== Taco Time ===
ks3095298.kimsufi.com IP address: 94.23.195.82
+
=== Tastee-Freez ===
 
+
=== Tim Hortons ===
Create 2 A records in the DNS zone of the domain you want to use:
+
=== Togo's ===
* openfoodfacts.ovh 94.23.195.82
+
=== Vapiano ===
* *.openfoodfacts.ovh 94.23.195.82
+
=== Wendy's ===
 
+
=== Wendy's Supa Sundaes ===
== Install ==
+
=== Whataburger ===
 
+
=== White Castle (restaurant)|White Castle ===
=== Update Debian ===
+
=== White Spot ===
 
+
=== Wimpy (restaurant)|Wimpy ===
Usually done by OVH Debian install:
+
=== Wingstop ===
 
+
[[fr:Projet:Restauration Rapide]]
<pre>
  −
apt-get update
  −
apt-get upgrade
  −
</pre>
  −
 
  −
=== Security ===
  −
 
  −
Install fail2ban and sudo:
  −
 
  −
<pre>
  −
apt-get install fail2ban
  −
apt-get install sudo
  −
</pre>
  −
 
  −
Create an user and give it sudo access:
  −
 
  −
<pre>
  −
adduser stephane
  −
adduser stephane sudo
  −
</pre>
  −
 
  −
 
  −
=== Install software used by Product Opener ===
  −
 
  −
<pre>
  −
apt-get install mongodb
  −
 
  −
apt-get install memcached
  −
 
  −
apt-get install imagemagick
  −
 
  −
apt-get install tesseract-ocr
  −
apt-get install tesseract-ocr-fra
  −
 
  −
apt-get install exim4
  −
dpkg-reconfigure exim4-config
  −
- Internet Site mail is sent by smtp 
  −
- 127.0.0.1
  −
 
  −
apt-get install geoip-bin geoip-database
  −
</pre>
  −
 
  −
=== Install libraries used by Product Opener ===
  −
 
  −
<pre>
  −
apt-get install zlib1g-dev
  −
</pre>
  −
 
  −
 
  −
=== Install development tools ===
  −
 
  −
Note: the Product Opener code is currently on a private bitbucket.org repository and is in the process of being made publicly available (open source). If you want to help us to clean / document Product Opener to open it, request access to the bitbucket repository: stephane@openfoodfacts.org
  −
 
  −
<pre>
  −
apt-get install build-essential
  −
apt-get install git
  −
 
  −
git clone https://stephane@bitbucket.org/openfoodfacts/product-opener.git
  −
</pre>
  −
 
  −
(get the link for your user on bitbucket.org)
  −
 
  −
 
  −
=== Apache 2.2 + mod_perl: Product Opener backend ===
  −
 
  −
==== Build ====
  −
 
  −
<pre>
  −
apt-get install libperl-dev
  −
 
  −
cd /home/stephane
  −
mkdir src
  −
cd src
  −
wget http://apache.crihan.fr/dist//httpd/httpd-2.2.29.tar.gz
  −
tar xvfz httpd-2.2.29.tar.gz
  −
cd httpd-2.2.29
  −
./configure --with-mpm=prefork --prefix=/home/stephane/apache  --enable-rewrite --enable-proxy --enable-proxy_http --enable-deflate  --disable-userdir --enable-headers
  −
make
  −
make install
  −
cd ~
  −
 
  −
cd ~/src
  −
wget http://mir2.ovh.net/ftp.apache.org/dist/perl/mod_perl-2.0.8.tar.gz
  −
tar xvfz mod_perl-2.0.8.tar.gz
  −
cd mod_perl-2.0.8
  −
perl Makefile.PL MP_APXS=/home/stephane/apache/bin/apxs
  −
make
  −
make install
  −
cd ~
  −
</pre>
  −
 
  −
==== Configuration ====
  −
 
  −
In ~/apache/conf/httpd.conf:
  −
 
  −
Change the port to something else than 80 (the reverse proxy will listen on 80 and forward to the backend on another port).
  −
 
  −
<pre>
  −
Listen 8001
  −
</pre>
  −
 
  −
If you are installing several Product Openers on the same machine, use different ports.
  −
 
  −
Change the Apache user to your user:
  −
 
  −
<pre>
  −
User stephane
  −
Group stephane
  −
</pre>
  −
 
  −
Add to apache/conf/httpd.conf:
  −
 
  −
<pre>
  −
LoadModule perl_module modules/mod_perl.so
  −
 
  −
PerlWarn Off
  −
PerlRequire /home/stephane/product-opener/cgi/startup.pl
  −
 
  −
 
  −
<Location /cgi>
  −
SetHandler perl-script
  −
PerlResponseHandler ModPerl::Registry
  −
PerlOptions +ParseHeaders
  −
Options +ExecCGI
  −
Order allow,deny
  −
Allow from all
  −
</Location>
  −
 
  −
 
  −
<VirtualHost *>
  −
DocumentRoot /home/stephane/product-opener/html
  −
ServerName openfoodfacts.ovh
  −
ErrorLog /home/stephane/logs/error_log
  −
CustomLog /home/stephane/logs/access_log combined
  −
ScriptAlias /cgi/ "/home/stephane/product-opener/cgi/"
  −
</VirtualHost>
  −
 
  −
PerlPostReadRequestHandler My::ProxyRemoteAddr
  −
</pre>
  −
 
  −
=== Apache 2.4 - light weight reverse proxy ===
  −
 
  −
==== Build ====
  −
 
  −
<pre>
  −
apt-get install libpcre3 libpcre3-dev
  −
 
  −
cd /home/stephane/src
  −
wget http://apache.websitebeheerjd.nl//httpd/httpd-2.4.12.tar.gz
  −
tar xvfz httpd-2.4.12.tar.gz
  −
cd httpd-2.4.12
  −
 
  −
cd srclib
  −
wget http://mir2.ovh.net/ftp.apache.org/dist//apr/apr-1.5.1.tar.gz
  −
wget http://mir2.ovh.net/ftp.apache.org/dist//apr/apr-util-1.5.4.tar.gz 
  −
tar xvfz apr-1.5.1.tar.gz
  −
tar xvfz apr-util-1.5.4.tar.gz
  −
ln -s apr-1.5.1 apr
  −
ln -s apr-util-1.5.4 apr-util
  −
cd ..
  −
 
  −
./configure --prefix=/home/stephane/proxy --enable-rewrite --enable-proxy --enable-proxy_http --disable-userdir --enable-headers --enable-expires --enable-mime --enable-so --with-included-apr
  −
 
  −
make
  −
make install
  −
cd ~
  −
</pre>
  −
 
  −
==== Configuration ====
  −
 
  −
in proxy/conf/httpd.conf :
  −
* uncomment #LoadModule rewrite_module modules/mod_rewrite.so
  −
* uncomment #LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
  −
 
  −
Add in httpd.conf :
  −
 
  −
<pre>
  −
<VirtualHost *>
  −
DocumentRoot /home/stephane/product-opener/html
  −
ServerName world.openfoodfacts.ovh
  −
ServerAlias *.openfoodfacts.ovh
  −
 
  −
ErrorLog /home/stephane/logs/proxy_error_log
  −
CustomLog /home/stephane/logs/proxy_access_log combined
  −
ServerAdmin stephane@openfoodfacts.org
  −
 
  −
<Directory "/home/stephane/product-opener/html">
  −
    Options Indexes FollowSymLinks
  −
    Require all granted
  −
</Directory>
  −
ProxyPreserveHost On
  −
RewriteEngine on
  −
RewriteCond  %{REQUEST_URI}  !/./
  −
RewriteRule ^(/cgi/.*)$ http://localhost:8001$1 [P,L]
  −
RewriteMap escape int:escape
  −
RewriteRule ^/favicon.ico$ /favicon.ico [L]
  −
RewriteCond  %{REQUEST_URI}  !^/images/
  −
RewriteCond  %{REQUEST_URI}  !^/js/
  −
RewriteCond  %{REQUEST_URI}  !^/rss/
  −
RewriteCond  %{REQUEST_URI}  !^/robots
  −
RewriteCond  %{REQUEST_URI}  !^/clicks/
  −
RewriteCond  %{REQUEST_URI}  !^/data/
  −
RewriteCond  %{REQUEST_URI}  !^/files/
  −
RewriteRule  ^(.*)$ http://localhost:8001/cgi/display.pl?${escape:$1} [P,L,QSA]
  −
</VirtualHost>
  −
 
  −
 
  −
<VirtualHost *>
  −
DocumentRoot /home/stephane/product-opener/html
  −
ServerName openfoodfacts.ovh
  −
ErrorLog /home/stephane/logs/proxy_error_log
  −
CustomLog /home/stephane/logs/proxy_access_log combined
  −
DirectoryIndex index.html index.shtml
  −
<Directory "/home/stephane/product-opener/html">
  −
    Options -Indexes +FollowSymLinks +Includes
  −
    Require all granted
  −
</Directory>
  −
RewriteEngine on
  −
RewriteCond %{HTTP_HOST} ^stephane\.openfoodfacts\.ovh
  −
RewriteRule ^/products$ /products.shtml [L]
  −
 
  −
</VirtualHost>
  −
 
  −
</pre>
  −
 
  −
 
  −
 
  −
=== Install Perl modules ===
  −
 
  −
If possible, use apt-get to install packages directly. If they are not available, you can use cpan to install the modules.
  −
 
  −
<pre>
  −
apt-get install libwww-perl libimage-magick-perl
  −
apt-get install  libxml-encoding-perl libtext-unaccent-perl libmime-lite-perl
  −
apt-get install libcache-memcached-fast-perl libjson-perl libclone-perl  libgraphviz-perl
  −
apt-get install libmime-lite-perl  # needs to be done after installing exim4
  −
apt-get install libcrypt-passwdmd5-perl libencode-detect-perl libgraphics-color-perl libbarcode-zbar-perl
  −
apt-get install libxml-feedpp-perl libmongodb-perl liburi-find-perl
  −
</pre>
  −
 
  −
Modules that could not be installed using apt-get:
  −
 
  −
<pre>
  −
cpan
  −
install URI::Escape::XS
  −
install Image::OCR::Tesseract # needs imagemagick installed first
  −
</pre>
  −
 
  −
Modules that HAVE to be installed using cpan:
  −
 
  −
As of Feb 3rd 2015, the MongoDB perl module installed through "apt-get install libmongodb-perl" is too old (0.45):
  −
 
  −
<pre>
  −
perl -MMongoDB -e 'print $MongoDB::VERSION . "\n"'
  −
0.45
  −
</pre>
  −
 
  −
This causes an error when trying to access a list of "tags" such as categories:
  −
 
  −
<pre>
  −
Software error:
  −
Not an ARRAY reference at /home/stephane/product-opener/cgi/Blogs/Display.pm line 797.
  −
</pre>
  −
 
  −
A newer MongoDB perl module needs to be installed with cpan.
  −
 
  −
<pre>
  −
cpan
  −
install MongoDB
  −
</pre>
  −
 
  −
<pre>
  −
perl -MMongoDB -e 'print $MongoDB::VERSION . "\n"'
  −
v0.708.0.0
  −
</pre>
  −
 
  −
cgi/startup.pl preloads a lot of modules, you can check that those modules are installed by running:
  −
 
  −
<pre>
  −
cd /home/stephane/product-opener/cgi
  −
perl startup.pl
  −
</pre>
  −
 
  −
=== Create some paths and links ===
  −
 
  −
<pre>
  −
cd /home/stephane/product-opener/cgi
  −
ln -s ./ Blogs
  −
ln -s S
 

Navigation menu