Initial software setup

From LaneWiki

Jump to: navigation, search

The following example was tested with CentOS 5.4 and assumes you are using at least version 0.20090526.1 of L’âne. Unless otherwise stated, these commands should be run as root. Also, you should configure your system to use the base OS repositories, update repositories, and any additional free software repositories (at a minimum EPEL).

Contents

Initial System Setup

  • Install the basic system, including the following packages and their dependencies. Also, if this is your first/only system, you should probably install the various development tools too.
    • postgresql
    • postgresql-server
    • postgresql-devel (if installing devel pkgs)
    • perl-Tk
    • perl-Pg (available on the L’âne SF download page or sometimes as perl-pgsql_perl5 in the OS repositories, this isn't DBD::Pg)
    • perl-XML-LibXML (the recommended, but not required, XML::SAX parser, as the PurePerl parser has issues)
    • perl-XML-SAX
    • perl-XML-NamespaceSupport
    • perl-XML-Parser
    • perl-libwww-perl
    • perl-IO-String
    • perl-SOAP-Lite
    • perl-URI
    • perl-XML-Simple
    • matchbox-window-manager (or some similar kiosk WM for the register, available on the L’âne SF download page too)
  • Create two users: a DBA, posmgr, and a register user, register.
 useradd posmgr -c "L'ane POS System Manager"
 useradd register -c "L'ane POS Register"

Configure Postgresql

  • Initialize the DB cluster (some RPMs do this step automatically on the first postgresql start, so it isn't always needed)
 /etc/init.d/postgresql initdb
  • Start PostgreSQL
 /etc/init.d/postgresql start
  • Enable automatic staring of PostgreSQL
 chkconfig --level 345 postgresql start
  • Create the database users
 su postgres
 createuser --createdb --superuser --no-createrole posmgr
 createuser --no-createdb --no-superuser --no-createrole register
 #exit back to root
  • Configure PostgreSQL to allow DB access
    • Edit ~postgres/data/pg_hba.conf, not needed on single system setups as they default to ident authentication on localhost.
  • Create the empty database
 su posmgr
 createdb mydbname
 #exit back to root

Install L’âne

  • Untar the L’âne archive in /opt (the following assumes L’âne now lives in /opt/LanePOS, which may not be true in all cases)
  • Optional, but recommended: Try running the test suite as a DBA. If it fails, L’âne will not work. Some tests in the datacap test occasionally fail because the test card numbers included in it have expired.
 su posmgr
 cd /opt/LanePOS/tests
 ./run-all-tests.t
 #exit back to root
  • Install the base dataset
    • The base-dataset.sql included in the archive is broken. See bug 1337 for an updated copy which fixes some of the problems with it.
 su posmgr
 psql mydbname < /opt/LanePOS/backOffice/utilities/installer/base-dataset.sql
 #if there were any errors, STOP AND FIX THEM
 #exit back to root
  • Edit the configuration file (/opt/LanePOS/config/site.pl) to point to your database. There is a sample file in /opt/LanePOS/config/sample-site.pl. At a minium you will need to define $ENV{'LaneDSN'}.

Configure the Store's Data

  • Add products, tenders, taxes, clerks, etc

Configure the Register

The following needs more specific details.

  • Create an XML Register file, which defines the register's interface. See /opt/LanePOS/register/xmlRegister and Category:Installation for samples.
  • Configure your system to start the register user's desktop on startup.
    • For example, in /etc/inittab
 x:5:respawn:su - register -c 'sleep 10 && startx'
  • Configure register to startup a basic kiosk environment
    • Sample ~register/.xinitrc
#!/bin/bash

xscreensaver -no-splash &
matchbox-window-manager&
/opt/LanePOS/register/xmlRegister/xmlRegister Tk /opt/LanePOS/register/xmlRegister/myregister.xml 2> ~/register-errors

Other Notes

  • Some systems will require pam modifications to allow a scripted register to start X, as it is a privileged program.
  • Make sure to check out Misc Perl oddness!
Personal tools