2007年11月19日 星期一

Install TinyERP 4.2 Server on Debian 4.0

Business model on open source is often trading-off between two things, source code and knowledge. You can get any source code but detail stories for it, if you don't like their way, share your knowledge to leverage them.

I have recently a chance to get around with TinyERP that is growing very fast on functionality, if you have no idea about Python language, to get Tiny running on Linux server is kind of tough work. Followings are my steps to complete the installation.

  1. Pre-dependencies
    • PostgreSQL server
  2. Install TinyERP server dependencies
    • Python 2.4
      • Incleded in standard base Debian 4.0 R1
    • PostgeSQL client
      • apt-get install postgresql-client
        • Default version is postgresql-7.4
    • Python and PostgreSQL adaptor
      • apt-get install python-psycopg
    • Python time zone
      • apt-get install python-tz
    • libxml2 and python binding
      • apt-get install python-xml python-libxml2
    • libxslt and python binding
      • apt-get install python-libxslt1
    • Reportlab pdf generator for Python
      • apt-get install python-reportlab
    • Python imaging library
      • apt-get install python-imaging
    • Graph visualization software
      • apt-get install graphviz
    • Pyparsing library
      • apt-get install python-pyparsing
  3. Get TinyERP server source file and install
    • wget http://tinyerp.com/download/stable/source/tinyerp-server-4.2.0.tar.gz
    • tar vxf tinyerp-server-4.2.0.tar.gz
    • cd tinyerp-server-4.2.0
    • sudo python setup.py install
      • Installation folder is /usr/lib/python2.4/site-packages/tinyerp-server
  4. Create TinyERP database
    • su - postgres
    • /usr/local/pgsql/bin/createdb --encoding=UNICODE terp
      • Assume PostgreSQL homed at /usr/local/pgsql and creating database named terp
  5. Startup TinyERP Server
    • cd /usr/lib/python2.4/site-packages/tinyerp-server
    • sudo python tinyerp-server.py -d terp -r postgres -w --db_host=localhost --db_port=5432 --logfile="tinyerp-server.log"
      • Assume the database name is terp, database owner is postgres, database server located at the same machine, database listening port is 5432, and logfile is tinyerp-server.log right in the current directory.
      • You can make a batch script (ex. run.sh) to shorten the long command typing.

沒有留言: