How to install OpenERP on FreeBSD

OpenERP is an opensource AGPL licensed enterprise resource planning software for small and medium size businesses.

Structural parts of the OpenERP system

  • PostgreSQL as backend database
  • OpenERP server to form the business logic (python based)
  • OpenERP clioent. Web and desktop GUI are available (python based and GTK based)

As host operating system Windows, Linux or alternative Unix like systems like FreeBSD are appropriate .

Infrastructure background

One of my servers was upgraded to FreeBSD 9.0-RELEASE from RC a few weeks ago. Feature set in this configuration:

  • Root is on ZFS dataset
  • skeleton jail was built and different jails was cloned by ZFS
  • NAT configured with Packet Filter
  • Ports collection mounted as read only nullfs into the jails
  • Everything is up to date.

The backend database

A separate jail was cloned for the PostgreSQL. The install was relative easy, the precompiled package was installed:

pkg_add -rv postgresql91-server

To initialize the database the next command was called:

/usr/local/etc/rc.d/postgresql initdbs

creating template1 database in /usr/local/pgsql/data/base/1 … FATAL:  could not create shared memory segment: Function not implemented
DETAIL:  Failed system call was shmget(key=1, size=2146304, 03600).

Postgres need SystemV IPC usage so it was allowed from within the jails. It can result security implications but is a must currently

jail_sysvipc_allow=”YES”

The rc.conf of the db jail was edited to achieve the reboot persistent start of the database:

postgresql_enable=”YES”

Configure the database for the OpenERP:

createuser ptlerp -P

Enter password for new role:
Enter it again:
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n

psql template1

template1=# alter user ptlerp with createdb;
template1=# select * from pg_user;
usename | usesysid | usecreatedb | usesuper | usecatupd | userepl |  passwd  | valuntil | useconfig
———+———-+————-+———-+———–+———+———-+———-+———–
pgsql   |       10 | t           | t        | t         | t       | ******** |          |
ptlerp  |    16388 | t           | f        | f         | f       | ******** |          |

create database ptlerp_test with owner=ptlerp;

Access the PostgreSQL from the loopback aliases:

/usr/local/pgsql/data/pg_hba.conf
host    all     all     127.0.0.1/8     md5

The OpenERP server

Install:

pkg_add -rv openerp-server

rc.conf:

openerpd_enable=YES

To start:

vipw
openerpd:*:951:951::0:0:Openerpd user:/tmp:/usr/local/bin/bash

su openerpd -c /usr/local/bin/openerp-server

Change the config in /usr/local/etc/openerp.conf

# Database options ####################################
db_name = ptlerp_test
db_user = ptlerp
db_password = changeme
db_host = 127.0.0.1

GTK client

GTK GUI login

Initial setup screen

Company informations

And so on, next, next, finish…

Have fun!

Advertisements

2 thoughts on “How to install OpenERP on FreeBSD”

  1. Hello,

    Thank you very much for the guide!

    I am having an issue though as I am unable to find the gtk-client.

    Is there anywhere I can download it from?

  2. Thanks a lot for this useful tutorial. I followed all the above steps but i got the following error do you have any idea how to fix this error?

    after pkg_add -rv openerp-server almost done I got:

    Finished loading postgresql-client-8.4.10 via a URL
    pkg_add: package ‘postgresql-client-8.4.10’ conflicts with postgresql-client-9.1.2
    pkg_add: please use pkg_delete first to remove conflicting package(s) or -f to force installation
    pkg_add: 1 package addition(s) failed

    Also, The openerp version is 6.0.3 is there any how that i can install openerp 6.1

    Thanks A lot.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s