Here are some basic installation instructions and a few other basics (quite a lot of text, I know!) which may help real bloody beginners (perhaps at the same time Ubuntu beginners) get OpenERP up and running. So, nothing for advanced users. Some information comes from the manuals, outdated info should be accounted for. Perhaps it would be better to help keep the official manual updated (I've never tried), though probably more time consuming. But better yet, you as expert may first
- comment, ok/nok?
- suggest corrections
- suggest improvements etc.
This worked for me, i. e. new OpenERP 5.0.12 installation on a newly installed Ubuntu 10.04, then migrating the exported database file from a OpenERP 5.0.6 on a Ubuntu 09.04.
Basic OpenERP installation on Ubuntu 10.04 Lucid Lynx for beginners on a single workplace
==> OpenERP server and GTK-client (Web client not covered, only useful for multi-user settings anyway) on a Gnome desktop (KDE should actually work as well).
1. Install PostgreSQL
==> Ubuntu with GUI:
System > Administration > Synaptic Package Manager
Select postgresql and mark for installation, then apply. Other dependent packages may be installed alongside.
==> or command in terminal:
Code:
sudo apt-get install postgresql
2. Change PostgreSQL Configuration File pg_hba.conf ==> command in terminal:
Code:
sudo cp /etc/postgresql/8.4/main/pg_hba.conf /etc/postgresql/8.4/main/pg_hba.conf.bck01
Code:
gksudo gedit /etc/postgresql/8.4/main/pg_hba.conf
The first command will make a backup copy of the original configuration file, then the second command starts the text editor gedit (possibly replace gedit by your favoured text editor; if your desktop is KDE instead of Gnome the command may be: kdesudo kate /etc/postgresql/8.4/main/pg_hba.conf).
Change the following two lines
Code:
# "local" is for Unix domain socket connections only
local all all ident
to
Code:
# "local" is for Unix domain socket connections only
# local all all ident
local all all md5
Save and close the changed text file.
3. Create Database-User "openuser"==> command in terminal:
Code:
johndoe$ sudo su - postgres
password: password_of_johndoe
postgres$ createuser --createdb --username postgres --no-createrole --pwprompt openuser
Enter password for new role: your_password_of_openuser
Enter it again: your_password_of_openuser
Shall the new role be a superuser? (y/n) n
postgres$
Quit from user postgres:
Code:
postgres$ exit
logout
johndoe$
==> Explanations:
With sudo su - postgres you log in to the *Unix* (Linux/Ubuntu) user postgres which is the "superuser" allowing you to do many things with PostgreSQL. See
https://help.ubuntu.com/community/PostgreSQL if you want to set a password for user "postgres" for security reasons.
--createdb : the new user will be able to create new databases
--username postgres : createuser will use the postgres user (superuser)
--no-createrole : the new user will not be able to create new users
--pwprompt : createuser will ask you the new user’s password
openuser : the new user name
If asked "Shall the new role be a superuser? (y/n)" then say no by typing n and then click enter, y is not necessary (possibly even a security risk).
exit : please use exit to logout from user "postgres"
Now restart PostgreSQL:
==> command in terminal:
Code:
sudo /etc/init.d/postgresql-8.4 restart
You may check
https://help.ubuntu.com/community/PostgreSQLif you want to run PostgreSQL with your Linux user rather than openuser (only on a single user workplace).
4. Install the necessary packages that OpenERP depends on ==> Ubuntu with GUI:
System > Administration > Synaptic Package Manager
Select the packages OpenERP server needs, they are listed here
http://doc.openerp.com/install/linux/server/under "Example on Ubuntu", and mark for installation, then apply. Other dependent packages may be installed alongside. Note: the python version should usually be 2.6 (not 2.5 or lower).
==> or command in terminal (may be a bit different in other distributions than K/Ubuntu):
Code:
sudo apt-get install python python-psycopg2 python-reportlab python-egenix-mxdatetime python-tz python-pychart python-pydot python-lxml python-vobject
Note: Other dependent packages may be installed alongside (e. g. python-reportlab will install python-imaging).
Now repeat the same with packages OpenERP client needs which are listed here
http://doc.openerp.com/install/linux/client/Note that as from Ubuntu 10.04 the package "python-xml" is no longer available in the repository and neither is it required for OpenERP to run.
==> or command in terminal (may be a bit different in other distributions than K/Ubuntu):
Code:
sudo apt-get install python-gtk2 python-glade2 python-matplotlib python-hippocanvas
Note: Other dependent packages may be installed alongside.
5. Download and unpack OpenERP Server Download the server file:
http://openerp.com/downloads.htmlUnpack the downloaded server file, change into the unpacked directory (cd):
==> command in terminal:
Code:
tar -zxvf openerp-server-5.0.12.tar.gz
cd openerp-server-5.0.12
Test before installing (optional):
==> command in terminal:
Code:
cd bin
python openerp-server.py
Upon this test command you should see a few lines of information starting with the date/time, then INFO, such as
[date/time] INFO:server:version - 5.0.12
etc., plus the last line says
[date/time] INFO:web-services:the server is running, waiting for connections...
Also note that the default database user may be shown as your Unix (Linux/Ubuntu) user and not "openuser" we created above. If so we'll have to remember that further down when starting the server after installation.
If these lines are not shown, you should probably check if you really followed the steps above correctly before continuing.
Now shutdown the OpenERP server testing with Ctrl + c and change directory back to your openerp-server-5.0.12 folder with:
==> command in terminal:
Code:
cd ..
6. Installing the OpenERP ServerAssuming you are still in the directory of the unpacked server file (i. e. openerp-server-5.0.12 if you followed the above), do:
==> command in terminal:
Code:
sudo python setup.py install
7. Download and unpack OpenERP ClientDownload the client file:
http://openerp.com/downloads.htmlUnpack the downloaded client file, change into the unpacked directory (cd):
==> command in terminal:
Code:
tar -zxvf openerp-client-5.0.12.tar.gz
cd openerp-client-5.0.12
Test before installing (optional):
==> command in terminal:
Code:
cd bin
python openerp-client.py
The OpenERP client should start, i. e. the GUI you will normally be working with. If the GUI does not start, you should probably check if you really followed the steps above correctly before continuing. Before installing (see below) you don't want to do much and you are not connected to the database anyway. So quit now and and change directory back to your openerp-client-5.0.12 folder with:
==> command in terminal:
Code:
cd ..
8. Installing the OpenERP ClientAssuming you are still in the directory of the unpacked client file (i. e. openerp-client-5.0.12 if you followed the above), do:
==> command in terminal:
Code:
sudo python setup.py install
9. Start OpenERPStart the OpenERP server with
==> command in terminal:
Code:
openerp-server --db_user=openuser --db_password=your_password_of_openuser
where --db_password is the password of the PostgreSQL database user "openuser" we created above (which may be a bit confusing).
Then you get several lines with some information similar to
[date/time] INFO:[some info]
such as shown here
http://doc.openerp.com/_images/terps_startup_log.pngwhich will stay permanent.
Open a new terminal tab and enter
==> command in terminal:
Code:
openerp-client
If you get errors like
Quote:
WARNING:common.options:Config file /home/your_user/.openerprc does not exist !
CRITICAL:init:Failed to open file 'openerp-icon.png': No such file or directory
CRITICAL:init:Ensure that the file /home/your_user/.openerprc is correct
don't panic. Disregard "config file ... does not exist", since by now .openerprc will have been generated automatically. Open that file (in /home/johndoe) and change the conflicting lines, for example in case of the above errors change
Code:
[path]
pixmaps = /usr/share/pixmaps/openerp-client
share = /usr/share/openerp-client
to
Code:
[path]
pixmaps = /usr/local/share/pixmaps/openerp-client
share = /usr/local/share/openerp-client
if your paths point to these folders, of course you would first check!, and start the client again. It should now work: The GUI should start and the first form may be the "OpenERP Survey". Click ok, not cancel.
Continue by first creating a new database (File > Databases > New Databases) or by restoring one from a previous installation.
More information about actually running and using OpenERP is quite well explained in the manual
http://doc.openerp.com/book/index.html , starting with database creation.
If you are new to OpenERP - obviously - you should really get used to the ERP by setting up a test database and a test company. It's all explained in the manual.
10. Create or Change configuration file openerp-server.confNote: openerp-server.conf is normally not (no longer) created with the standard installation script. But if you want to create one, then start your favoured text editor with admin rights, in Ubuntu (Gnome) you may type
Code:
gksudo gedit /etc/openerp-server.conf
in a new terminal tab.
Replace or insert the lines as follows
Code:
db_name =
db_user = openuser
db_password = your_password_of_openuser
Note that if you have a file with only those three lines it will not run, you have to add [options] on top! I. e.:
Code:
[options]
db_name =
db_user = openuser
db_password = your_password_of_openuser
Starting the server with such a configuration file (then of course omit the other options mentioned above):
Code:
openerp-server --config=/etc/openerp-server.conf
That file should have at least read rights for group/other (should be the default when you do it as suggested), else you would have to start the server with sudo.
For security reasons this is IMO better than creating a server configuration file (
http://doc.openerp.com/developer/1_1_In ... ation.html ), although in both cases the file contains the db password in plain text. For multi user settings you will have to think about this and other security issues.
11. Shutdown OpenERP
Client: Quite obvious, in menu "File" select quit or Ctrl + q
Server: Go to your terminal window where you started the server: Ctrl + c. If this doesn't stop the server immediately wait for threads to close or see
http://doc.openerp.com/developer/1_1_In ... erver.html
(replace tiny with openerp, if manual still not updated).
12. Backup Database
If you use the configuration from above when starting openerp-server you may have to enter the openuser database password on the terminal window (!) where you started the server when backing up or restoring a database. Otherwise you may run into a timeout after minutes of waiting in front of your GUI without you knowing why ...
13. Launch OpenERP on System Start (Autostart)
When installing the PostgreSQL database a startup script is automatically added in /etc/init.d/postgresql-8.4. The OpenERP install script doesn't seem to do that. I suspect the reason is that OpenERP server should start after PostgreSQL is up and running. Bear this in mind if you want to create a startup script. But it's probably easiest to add a launcher (Gnome) as you would for other software. Either right-click on a panel and "add to panel" or, similarly, right-click on Applications > Edit Menus. You may do this for the OpenERP server and of course also for the client.
14. Trouble Shooting
When you have errors like "Could not connect to server!" then OpenERP server may want to connect to the database not using "openuser" (or whatever) but rather your current Linux/Ubuntu user. Check if you have really started OpenERP server as indicated above.
See also:
http://doc.openerp.com/book/1/1_1_Inst_ ... stallation
http://sisalp.fr/index.php/post/OpenERP ... au-serveur
etc. [helpful trouble shooting links?]
*****************************************************************
edit 1: 2010-07-26, 17:58: section 3: Separate "Quit from user postgres:", it's not a command ...
edit 2: 2010-07-26, 21:50: added apt-get commands in section 4, thanks to Bounaberdi. A few other minor corrections.