Archive

Archive for July, 2008

Don't let yourself get blocked by memory problems

There are a few shortcomings with PHP5, but not so many. One of them, though, is that memory limits are a bit tricky to handle. We don’t handle them very well in Dokeos either, so the results of experiencing a memory limit in Dokeos is this:

Yes, nothing. That’s generally what you would end up with. So if you want to make sure Dokeos can handle pretty much every kind of thing you would want it to do, you would be wise to put a memory limit of at least 8MB in your php.ini file. Yes, 8MB is a lot, and we will be working on this in the future, but at the same time current servers can afford it, even for very large configurations (it’s only a memory “limit”, it doesn’t mean you *have* to use 8MB for each user).

If you are going to play with course copies or SCORM packages import inside Dokeos, make sure you put that limit much higher. Very large SCORM packages tend to use up to 60MB of memory (I think that’s due to our use of PCLZip, but I haven’t had time to investigate this yet).

Memory limit can be changed inside your php.ini configuration file (look for “memory_limit”) or from inside your Apache VirtualHost definition, using a line like this one:

php_admin_value memory_limit 64M

Other settings you might want to change are:

  • post_max_size
  • upload_max_filesize
  • max_execution_time
  • max_input_time

These will all affect your large files uploads and long script executions (like large import/export operations).

Evolution mail reply-with-templates plugin integrated into upstream plugins

Following-up on my latest article about this plugin (where you can find links to download its early version), it seems that the plugin had been awaited for a long time. Apparently feature requests dating up to 6 years ago were registered to ask for some kind of feature that would enable people to reply to e-mails using templates.

I remember scanning through them before asking Diego Escalante Urrelo to develop it for me and publish it in the right places. Well, for BeezNest it’s a great satisfaction, as always, to see one of our (analytic and financial) contributions has been put into the main code for Evolution. Reports say it has been accepted into Evolution 2.23.5. Considering at this time I only have 2.22.3.1 in my Ubuntu Hardy Heron, it’s going to be a little while until I can test this integration, but I’m happy it’s waiting there for me.

Another good job from the BeezNest team!

Export contacts from a Windows AddressBook (.wab) to LDAP

July 18, 2008 Leave a comment
This article was first written in December 2004 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/193).

Convert your .wab file with libwab – turns Windows Address Book (WAB) files into ldif.

Then, import the newly-created ldif file into your LDAP server, after having adapted the entries if needed.

See also the Libpst project.

Categories: English, Tech Crunch Tags: ,

Agregado página Dokeos 1.8.6

July 17, 2008 6 comments

Acabo de agregar una página sobre Dokeos 1.8.6 y los planes de desarrollo para esta proxima versión.

Added Dokeos 1.8.6 page

I have added a Dokeos 1.8.6 page with details of the roadmap for 1.8.6, and hidden the Dokeos 1.8.5 page, considering we are now fully into the development of fixes and new features for 1.8.6.

Home security Methodology Vacation Guide

Although it’s got nothing to do with Dokeos (apart from the way I found it), I think this manual is worth a look if you are going on vacation. It’s a home-safety manual written by computer security professionals. It is not damn funny as I was half-expecting, but it kind of gives you a nice checklist of what you can do to protect your house before leaving on a sunny beach or a snowy mountain.

http://www.isecom.org/hsm/

Categories: English, security

Installing OpenERP 4 on Ubuntu

July 16, 2008 6 comments

I have recently improved the installation guide for OpenERP 4 on Ubuntu (8.04). Previously, this documentation was available on the old OpenERP wiki, but it has been lost to the public during an upgrade of the website. The contents of this documentation has been sent to me as an author and I am happy to provide it below.

I’ve added information on how to check server logs on startup, how to make it work with the right port with PostgreSQL 8.3 and how to connect with the client once the installation is over.

OpenERP, previously called TinyERP, but renamed due to the mismatch between its name and its size, is an open-source ERP system written (mostly) in Python and initiated in Belgium by one of our professional acquaintances.

We are currently trying it out in order to evaluate its potential.

Ubuntu 8.10 (Intrepid Ibex)

Install Client 4.2.3.4

Install client dependencies:

$ sudo apt-get install python-egenix-mxdatetime python-egenix-mxtools

Download OpenERP/TinyERP deb package from the official unstable Debian
repository. (It’s not recommended add this repository to your apt
sources list. There are many *realy* unstable packages on it).

http://packages.debian.org/sid/all/tinyerp-client/download

After download, install:

$ sudo dpkg -i tinyerp-client_4.2.3.4-1_all.deb

Install Server 4.2.3.4

Install server dependencies:

$ sudo apt-get install python-psycopg python-libxslt1 python-reportlab python-tz libpq5 python-egenix-mxdatetime python-egenix-mxtools python-xml python-lxml

Download OpenERP/TinyERP deb package from the official unstable Debian
repository. (It’s not recommended add this repository to your apt
sources list. There are many *realy* unstable packages on it).

http://packages.debian.org/sid/all/tinyerp-server/download

After download, install:

$ sudo dpkg -i tinyerp-server_4.2.3.4-3_all.deb

PostgreSQL database

The server requires PostgreSQL database. To install type:

$ sudo apt-get install postgresql

Create the database

When the PostgreSQL are done, you have to create a database. Type:

$ sudo su postgres
$ createuser -U postgres –createdb –no-adduser -P terp
$ createdb -U postgres -O terp –encoding=UNICODE terp
$ exit

Set your DB password (created above) in /etc/default/tinyerp-server file:

$ sudo gedit /etc/default/tinyerp-server

Like this:

# Specify the database password (Default: not set).
DATABASE_PASSWORD=”my_role_password”

Restart Server

After set the password we need restart the server:

sudo /etc/init.d/tinyerp-server restart

Connecting with TinyERP/OpenERP client

If you have installed the client, use the Applications -> Internet ->Tiny ERP Client

The default connection settings should already be the ones you configured in the server’s configuration file.

If you haven’t created any other account yet, use admin/admin to connect with the client, and define the installation settings (your company details, mainly).

Hardy Heron (8.04) and Gutsy Gibbon (7.10)

Install packages

Install all packages listed below (some might be installed already), or
just type:

$ sudo apt-get install python-xml python-libxml2 python-libxslt1 python-psycopg python-imaging python-pyparsing python-reportlab graphviz python-tz python-pyopenssl gs-gpl python-matplotlib

PostgreSQL database

Installation

Install PostgreSQL 8.2.x on Synaptic, or type:

$ sudo apt-get install postgresql-8.2

Note: There some troubles related with PostregreSQL 8.3 as exposed in this bug report. Avoid it on this TinyERP/OpenERP version (4.2.0-1ubuntu1).

Note: Now PostgreSQL 8.3 works with TinyERP 4.2 with 4.2.3.2 and later

Create the database

When the PostgreSQL are done, you have to create a database.Type:

$ sudo su postgres
$ createuser -U postgres –createdb –no-adduser -P terp
$ createdb -U postgres -O terp –encoding=UNICODE terp
$ exit

See Setup a Postgresql user and database for details.

It is not recommended to use another username for the database user, as the distinction between the system user and the database user is not strong enough at this point in time (version 2.4) and it might result in you not being able to create new databases from the client interfaces.

Install TinyERP 4.2.2 Server and Client

Note: Ubuntu packages will create a *terp* system user that will be used to start the
server and possibly (for some operations like creating a new database) to connect to the database.

32bits architecture

There is now a repository which holds the new 4.2.2 of tinyerp for
Ubuntu (it might also work on debian).

The repository can be found on http://ubuntu.roomandspace.com/. Just go
there and add the repository, so this should update your 4.2.2 of
tinyerp, but it does not automaticaly update existing database, only a
new installation is tested.

After add repository install from Synaptic, or type:

$ sudo apt-get install tinyerp-server tinyerp-client

64bits architecture

The repository does not work with x86_64 architecture, so you have to install them manualy.

First download TinyERP .deb files (“tinyerp-server_4.2.2-1_all.deb” and “tinyerp-client_4.2.2-1_all.deb”) directly from the repository folder.

http://ubuntu.roomandspace.com/dists/hardy/main/binary-i386/

Now install the packages manualy.

$ sudo dpkg –install /tinyerp-client_4.2.2-1_all.deb
$ sudo dpkg –install /tinyerp-server_4.2.2-1_all.deb

Starting the server

Note: For 7.10 and Postgres 8.2, the default port for Postgres is 5432.
However the config file “/etc/default/tinyerp-server” has the postgres
port set at 5433. You must change this or you will get an error stating
“cannot connect to server”.

Note: For 8.04 and Postgres 8.3, the default port for Postgres is 5433,
and you might have the opposite problem that the port defined in the
tiny configuration is 5432. You must change this or you will get an
error stating “cannot connect to server”.

To change it, open a terminal and type:

$ sudo nano /etc/default/tinyerp-server

When it comes up, scroll down to the setting for postgres and change to
5432. Press “ctrl o” to save and “ctrl x” to exit. Restart the
tinyerp-server.

$ sudo /etc/init.d/tinyerp-server restart

The process will be started with a username depending on what USER you
have defined in /etc/default/tinyerp-server. For trial/development
purposes, you can use your Ubuntu username. However, for production
environments, using a specific Ubuntu user for the TinyERP/OpenERP
process is recommended.

If your server still doesn’t start, you can check the logs in real time
by using the command

$ sudo tail -f /var/log/tinyerp.log

Connecting with TinyERP/OpenERP client

If you have installed the client, use the Applications -> Internet ->
Tiny ERP Client

The default connection settings should already be the ones you
configured in the server’s configuration file.

If you haven’t created any other account yet, use admin/admin to connect
with the client, and define the installation settings (your company
details, mainly).

Creating more databases

Creating more databases can normally be done through the rich
TinyERP/OpenERP client, by using the /File -> Databases -> New database/
menu (using the default password “admin” if you haven’t changed it).

However, and as reported on the forum
, you might run into
the error “Could not create database” when doing that. On an Ubuntu (or
Debian) server, this might be due to one of two things, which you can
check out on the Linux troubleshooting page

Adding a module

You can add modules through the Administration -> Modules management ->
Import new module.

However, this depends on the permissions set on the
/usr/share/tinyerp-server/addons/ directory. If not set correctly, you
will receive the following error message:

Error !
Can not create the module file:
/usr/lib/tinyerp-server/addons/[yourmodule].zip!

The directory indicated is actually a symbolic link to
/usr/share/tinyerp-server/addons/

To make sure you can install new modules, you have to let the system
user *terp* write in this directory. For example, you could change the
permissions by issuing the following command:

sudo chown -R terp /usr/share/tinyerp-server/addons

Feisty/Edgy

Open ERP is available in the repositories. Use the instructions here:
InstallFromPackages to install server and/or client.

Note: In Edgy, the version of OpenERP is 3.3.0, in Feisty, it is 4.0.0.

Installation from source (for all versions)

Using Synaptic Package Manager

get (some might be installed already)

  • python-xml
  • python-libxml2
  • python-libxslt1
  • python-psycopg
  • python-imaging
  • python-pyparsing
  • python-reportlab
  • graphviz
  • postgresql
  • python-tz
  • python-pyopenssl
  • gs-gpl
  • python-matplotlib

Using command line : (cut/paste in a terminal)

$ sudo apt-get install python-xml python-libxml2 python-libxslt1 python-psycopg python-imaging python-pyparsing
$ sudo apt-get install python-reportlab graphviz postgresql python-tz python-pyopenssl gs-gpl python-matplotlib
$ sudo apt-get install python-lxml python-pychart python-hippocanvas

Creating the database

When the installations are done, you have to create a database, see
Setup a Postgresql user and database

for details.

TinyERP Server

*And now* (This does not need to be done if you install using Synaptic
or apt-get) TinyERP server must be decompressed and started;

tar xzvf tinyerp_server-v…tar.gz
cd server/bin
tinyerp_server.py

Verbose version : Download and extract the TinyERP version of your
choice. Run the server as user “postgres” (by typing “sudo su postgres”
and your password (of the default user, not the postgres user) in the
terminal) and then typing “python2.4 tinyerp-server.py” in
“tinyerp-server-directory/bin/”. Your server is now running, check

$ ps ax

TinyERP Client

*Done* – next step is to get a client running.

Installing OpenERP Client on Ubuntu Linux Desktop

apt-get install tinyerp-client python-tz python-psycopg python-matplotlib

Now you got TinyERP installed but it is an old version. I install the
old version first because the new version from Room and Space
is missing the pixmaps. Do following
to install the new version.

Get deb file from Room and Space then
execute the deb file from desktop, don’t run as dpkg otherwise you might
not get all dependencies installed.

/As a side note the server deb file from Room and Space
, and probably the client as well will
also work on a debian box. I do have the server running on a Debian
box./ –gruessle

02:05, 4 October 2008 (UTC)

NOTES AND OLDIES

for *7.04 (“feisty fawn”)*, if you are using the development version of
tinyerp, you can use python2.5 (by replacing the commands “python2.4
tinyerp-server.py” with “./tinyerp-server.py” below). python2.5 was
incompatible with 4.0 version of tinyerp.

Note: There’s no need of creating a database outside of the
tinyerp-client! Check Postgresql setup page in this wiki. Download the
tiny*.tar.gz files (not the tiny-packages), extract them, position in
the tiny*/bin directory and start tiny*.

There might be some problems with older versions of tinyERP. Search for
the tinyERP-config files “.terp_serverrc” and “.terprc” and change (or
simply remove) them before starting a new version. This search can be
done with these commands in a terminal:

$ sudo find / -name “.terprc” -print
$ sudo find / -name “.terp_serverrc” -print

Older versions of Ubuntu (Breezy)

1.Modify the /etc/apt/source.lists (using a text editor like gedit, kate or nano (in this example gedit is used – if you don`t have it – just replace gedit with the name of your programm of choice))

$ sudo gedit /etc/apt/sources.list
# (then you`ll be asked to enter the root password)

– Uncomment these two lines or add it if it does not exist:

deb http://fr.archive.ubuntu.com/ubuntu breezy universe multiverse
deb-src http://fr.archive.ubuntu.com/ubuntu breezy universe multiverse

– Save the file and launch the apt command

2.Update the repository by typing

$ sudo apt-get update

in command lines or GUI (ubuntu 5.10)

System>administration>synaptic package manager

(if you`re using kubutu or other ubuntu-based distributions you may have
another package manager (like adept for kubuntu)

3.Install the required packages and postgresql database by typing (in command line)

$ sudo apt-get install python2.4-xml python2.4-libxml2 python2.4-libxslt1 python2.4-psycopg
python2.4-imaging python2.4-pyparsing python2.4-reportlab graphviz postgresql-7.4

or with a GUI /package manager (Synaptic/Adept) (ubuntu 5.10)

# select the following packages from the list and choose install

  • python2.4-xml
  • python2.4-libxml2
  • python2.4-libxslt1
  • python2.4-psycopg
  • python2.4-imaging
  • python2.4-pyparsing
  • python2.4-reportlab
  • graphviz
  • postgresql-7.4

then commit the changes

Normally at this step the required packages are installed and the
postgresql server is launched. For TinyERP-server above v4.0.0 you don’t
have to set up postgresql as described in STEP 4.1, just go to STEP 5 on
this page. You will now go to the STEP 4.1 (You are now in 2.1.9.4 to
configure your Postgresql database.)

5.Download the Tinyerp Server Package.

6.Decompress it (* means: enter the full path here of your download);

$ cd /
$ tar xzvf /home/…/tinyerp-server-v…tgz*
$ sudo chown -R postgres server

7. Start tinyerp server

$ sudo su postgres
$ cd server
$ ./bin/tinyerp-server.py -d terp -r postgres -w postgres

After shutting down the server, next time you only need to redo step 7

 

20130727 update: Due to massive spamming of this (apparently still very popular) article, I am closing the comments section. In any case, the version of OpenERP has changed now and the installer is probably very different than it was for v4.

%d bloggers like this: