Instalacion Paso a Paso

9
Open ERP Forum Index Search Register Profile Log in to check your private messages RSS Mailing List Log in How-to: Basic Installation on Ubuntu 10.04 for beginners Open Object Forum Index -> Installation Questions View previous topic :: View next topic Author Message wuergler Joined: 04 Feb 2009 Posts: 36 Location: Berne, Suisse/Switzerland Posted: Mon Jul 26, 2010 3:33 pm Post subject: How-to: Basic Installation on Ubuntu 10.04 for beginners 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 Open ERP On Demand Community Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html... 1 de 9 07/09/10 08:25

description

openerp

Transcript of Instalacion Paso a Paso

Page 1: Instalacion Paso a Paso

Open ERP Forum

Index Search Register Profile Log in to check your private messages RSS Mailing List Log in

How-to: Basic Installation on Ubuntu 10.04 for beginners

Open Object Forum Index -> Installation Questions

View previous topic :: View next topic

Author Message

wuergler

Joined: 04 Feb 2009Posts: 36Location: Berne,Suisse/Switzerland

Posted: Mon Jul 26, 2010 3:33 pm Post subject: How-to: Basic Installation on Ubuntu 10.04 forbeginners

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 upand running. So, nothing for advanced users. Some information comes from the manuals, outdatedinfo should be accounted for. Perhaps it would be better to help keep the official manual updated (I'venever 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, thenmigrating 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 settingsanyway) on a Gnome desktop (KDE should actually work as well).

1. Install PostgreSQL

==> Ubuntu with GUI:System > Administration > Synaptic Package ManagerSelect postgresql and mark for installation, then apply. Other dependent packages may be installedalongside.==> 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 secondcommand starts the text editor gedit (possibly replace gedit by your favoured text editor; if yourdesktop 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 onlylocal   all         all                               ident

to

Code:

# "local" is for Unix domain socket connections only# local   all         all                               identlocal   all         all                               md5

Open ERP On Demand Community

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

1 de 9 07/09/10 08:25

Page 2: Instalacion Paso a Paso

Save and close the changed text file.

3. Create Database-User "openuser"

==> command in terminal:

Code:

johndoe$ sudo su - postgrespassword: password_of_johndoepostgres$ createuser --createdb --username postgres --no-createrole --pwpromptopenuserEnter password for new role: your_password_of_openuserEnter it again: your_password_of_openuserShall the new role be a superuser? (y/n) npostgres$

Quit from user postgres:

Code:

postgres$ exitlogoutjohndoe$

==> 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 passwordopenuser : the new user nameIf asked "Shall the new role be a superuser? (y/n)" then say no by typing n and then click enter, y isnot 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 checkhttps://help.ubuntu.com/community/PostgreSQLif you want to run PostgreSQL with your Linux user rather than openuser (only on a single userworkplace).

4. Install the necessary packages that OpenERP depends on

==> Ubuntu with GUI:System > Administration > Synaptic Package ManagerSelect the packages OpenERP server needs, they are listed herehttp://doc.openerp.com/install/linux/server/under "Example on Ubuntu", and mark for installation, then apply. Other dependent packages maybe 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 herehttp://doc.openerp.com/install/linux/client/Note that as from Ubuntu 10.04 the package "python-xml" is no longer available in the repository andneither 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

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

2 de 9 07/09/10 08:25

Page 3: Instalacion Paso a Paso

Note: Other dependent packages may be installed alongside.

5. Download and unpack OpenERP Server

Download the server file: http://openerp.com/downloads.html

Unpack the downloaded server file, change into the unpacked directory (cd):==> command in terminal:

Code:

tar -zxvf openerp-server-5.0.12.tar.gzcd openerp-server-5.0.12

Test before installing (optional):==> command in terminal:

Code:

cd binpython openerp-server.py

Upon this test command you should see a few lines of information starting with the date/time, thenINFO, such as[date/time] INFO:server:version - 5.0.12etc., 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 serverafter installation.If these lines are not shown, you should probably check if you really followed the steps above correctlybefore 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 Server

Assuming you are still in the directory of the unpacked server file (i. e. openerp-server-5.0.12 if youfollowed the above), do:==> command in terminal:

Code:

sudo python setup.py install

7. Download and unpack OpenERP Client

Download the client file: http://openerp.com/downloads.html

Unpack the downloaded client file, change into the unpacked directory (cd):==> command in terminal:

Code:

tar -zxvf openerp-client-5.0.12.tar.gzcd openerp-client-5.0.12

Test before installing (optional):==> command in terminal:

Code:

cd binpython openerp-client.py

The OpenERP client should start, i. e. the GUI you will normally be working with. If the GUI does notstart, 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 databaseanyway. So quit now and and change directory back to your openerp-client-5.0.12 folder with:==> command in terminal:

Code:

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

3 de 9 07/09/10 08:25

Page 4: Instalacion Paso a Paso

cd ..

8. Installing the OpenERP Client

Assuming you are still in the directory of the unpacked client file (i. e. openerp-client-5.0.12 if youfollowed the above), do:==> command in terminal:

Code:

sudo python setup.py install

9. Start OpenERP

Start 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 directoryCRITICAL: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 generatedautomatically. Open that file (in /home/johndoe) and change the conflicting lines, for example in caseof the above errors change

Code:

[path]pixmaps = /usr/share/pixmaps/openerp-clientshare = /usr/share/openerp-client

to

Code:

[path]pixmaps = /usr/local/share/pixmaps/openerp-clientshare = /usr/local/share/openerp-client

if your paths point to these folders, of course you would first check!, and start the client again. Itshould now work: The GUI should start and the first form may be the "OpenERP Survey". Click ok, notcancel.

Continue by first creating a new database (File > Databases > New Databases) or by restoring onefrom a previous installation.More information about actually running and using OpenERP is quite well explained in the manualhttp://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 testdatabase and a test company. It's all explained in the manual.

10. Create or Change configuration file openerp-server.conf

Note: 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

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

4 de 9 07/09/10 08:25

Page 5: Instalacion Paso a Paso

Code:

gksudo gedit /etc/openerp-server.conf

in a new terminal tab.Replace or insert the lines as follows

Code:

db_name =db_user = openuserdb_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 = openuserdb_password = your_password_of_openuser

Starting the server with such a configuration file (then of course omit the other options mentionedabove):

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 assuggested), 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_Introduction/3_configuration.html ), although in both casesthe file contains the db password in plain text. For multi user settings you will have to think about thisand other security issues.

11. Shutdown OpenERP

Client: Quite obvious, in menu "File" select quit or Ctrl + qServer: Go to your terminal window where you started the server: Ctrl + c. If this doesn't stop theserver immediately wait for threads to close or seehttp://doc.openerp.com/developer/1_1_Introduction/6_shutdown_server.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 theopenuser database password on the terminal window (!) where you started the server when backingup or restoring a database. Otherwise you may run into a timeout after minutes of waiting in front ofyour 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 thatOpenERP server should start after PostgreSQL is up and running. Bear this in mind if you want tocreate a startup script. But it's probably easiest to add a launcher (Gnome) as you would for othersoftware. Either right-click on a panel and "add to panel" or, similarly, right-click on Applications > EditMenus. 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 tothe database not using "openuser" (or whatever) but rather your current Linux/Ubuntu user. Check ifyou have really started OpenERP server as indicated above.

See also:http://doc.openerp.com/book/1/1_1_Inst_Config/1_1_Inst_Config_install.html#verifying-your-linux-installationhttp://sisalp.fr/index.php/post/OpenERP-Impossible-de-se-connecter-au-serveuretc. [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 otherminor corrections.

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

5 de 9 07/09/10 08:25

Page 6: Instalacion Paso a Paso

Last edited by wuergler on Mon Jul 26, 2010 10:00 pm; edited 2 times in total

Back to top

Bounaberdi

Joined: 16 Feb 2005Posts: 1603Location: Annecy &Toulon,France

Posted: Mon Jul 26, 2010 4:41 pm Post subject:

Excellent !

can you confirm you need to pre-create a first database by command ?do you know why ?regards_________________Dominiquehttp://sisalp.fr/demo.html , Hebergement http://sisalp.fr/openerp-serveur-gratuit.html

Back to top

wuergler

Joined: 04 Feb 2009Posts: 36Location: Berne,Suisse/Switzerland

Posted: Mon Jul 26, 2010 6:14 pm Post subject:

@ BounaberdiThanks.No, in my opinion it is not necessary to create a database before you log in to OpenERP by GUI andcreate it there ...That's why in section 3 above I would only create the user "openerp" (or whatever).

Or was the text unclear somewhere else?Bob

Back to top

Bounaberdi

Joined: 16 Feb 2005Posts: 1603Location: Annecy &Toulon,France

Posted: Mon Jul 26, 2010 7:05 pm Post subject:

Ok, I agree, this shouldn't be required.I read the title of 3. a bit too fast.very precise tutorialthe best documentation I know about this.Wouldn't be useful to copy the apt-get commands needed instead of pointing to the messed officialdoc ?Thank you_________________Dominiquehttp://sisalp.fr/demo.html , Hebergement http://sisalp.fr/openerp-serveur-gratuit.html

Back to top

wuergler

Joined: 04 Feb 2009Posts: 36Location: Berne,Suisse/Switzerland

Posted: Mon Jul 26, 2010 10:14 pm Post subject:

Bounaberdi, you are right, I added the apt-get commands.

You are (or anybody is) welcome to suggest more inaccuracies, thanks!

Back to top

stoltoguzzi

Joined: 11 Apr 2010Posts: 25

Posted: Tue Jul 27, 2010 2:39 pm Post subject: All-in-one

I used this script to install on Ubuntu 10.04

http://openerpappliance.com/2009/09/15/openerp-all-in-one-installer-update-for-dummies/

Back to top

Bounaberdi

Joined: 16 Feb 2005Posts: 1603Location: Annecy &Toulon,France

Posted: Tue Jul 27, 2010 4:54 pm Post subject: Re: All-in-one

stoltoguzzi wrote:

I used this script to install on Ubuntu 10.04

http://openerpappliance.com/2009/09/15/openerp-all-in-one-installer-update-for-dummies/

Whichever script you use, you have to perfectly understand what is to be done if you want to maintainthe solution over time. This is the benefit from this tutorial.This is true also with xoe script which I publish for a similar purpose.regards

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

6 de 9 07/09/10 08:25

Page 7: Instalacion Paso a Paso

_________________Dominiquehttp://sisalp.fr/demo.html , Hebergement http://sisalp.fr/openerp-serveur-gratuit.html

Back to top

liebana

Joined: 28 Jan 2009Posts: 135Location: Spain

Posted: Tue Jul 27, 2010 6:20 pm Post subject:

Hi

To generate the .openerprc that later is renamed to a .conf file you can use the command:

$ ./openerp-server.py -r oerp_user -w oerp_password -s

I will also remark that the installation of openerp-server and openerp-client is optional indevelopment/testing enviroments.

Best regards._________________Carlos Liébana Anerowww.ting.es

Back to top

Bounaberdi

Joined: 16 Feb 2005Posts: 1603Location: Annecy &Toulon,France

Posted: Tue Jul 27, 2010 8:13 pm Post subject:

You are rightas an exemple, this is command generated for starting http://dev5.sisalp.net

Code:

echo "[options]" >  /home/sisalpuser/openerp/dev5/config_file/server_dev5.conf

echo "admin_passwd = admin" >>  /home/sisalpuser/openerp/dev5/config_file/server_dev5.conf

nohup /home/sisalpuser/openerp/dev5/server/bin/openerp-server.py --config=/home/sisalpuser/openerp/dev5/config_file/server_dev5.conf --save --db_user=pg-dev5--interface=10.0.0.101 --port=8073 --net_port=8074 --pidfile=/home/sisalpuser/openerp/dev5/pid_file/server_dev5.pid  --log-level=info [email protected] --smtp=smtp.gmail.com --smtp-port=587 [email protected] --smtp-password=xxxxxx --smtp-ssl=True --logfile=/home/sisalpuser/openerp/dev5/log/server_dev5.log &

The only thing you cannot put as parameter is a strong openerp super_admin password which mustbe there before you start your server so you never have an "admin" password on line. Not in the case

above of course regards_________________Dominiquehttp://sisalp.fr/demo.html , Hebergement http://sisalp.fr/openerp-serveur-gratuit.html

Back to top

brzopletic

Joined: 05 Aug 2010Posts: 5

Posted: Thu Aug 05, 2010 9:46 pm Post subject: Error loading image

Hi to everybody!After making all according to wuergler instructions, I've done all as instructed but on point no.9. StartOpenERP I'm stuck. While testing opening openerp-client I've had the same error as stay ininstructions:

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 directoryCRITICAL:init:Ensure that the file /home/my_user/.openerprc is correct

.Then I've changed code in /home/my_user/.openerprc inserting "local" and started the openerp-clientagain. Than received two errors:

Quote:

(openerp-client.py:1310): libglade-WARNING **: Error loading image: Failed to open file'/usr/local/share/openerp-client/pixmaps/openerp_logo.png': No such file or directory.

(openerp-client.py:1310): libglade-WARNING **: could not convert string to type `GdkPixbuf' forproperty `pixbuf'

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

7 de 9 07/09/10 08:25

Page 8: Instalacion Paso a Paso

I've checked .openerprc again but there were corrected paths with "local"

Quote:

pixmaps = /usr/local/share/pixmaps/openerp-clientshare = /usr/local/share/openerp-client

After restarting computer there was no change, still same errors. I tried again open client like test inbin folder with"python openerp-client.py" and client was open with logo.Tried again using "openerp-client" in /home/my_user and again I had, as mentioned above, twowarnings.

Could somebody help me? What's wrong?

Thanks in advance!

Back to top

wuergler

Joined: 04 Feb 2009Posts: 36Location: Berne,Suisse/Switzerland

Posted: Sat Aug 07, 2010 6:32 pm Post subject:

If I understand you correctly, the client starts when testing (section 7), but you get the error afterinstallation when starting with the command "openerp-client"?

Same thing with

Code:

python /usr/local/lib/python2.6/dist-packages/openerp-client/openerp-client.py

?

Do you have any other configuration files? Like /home/your_user/.openerp_serverrc or /etc/openerp-server.conf

What versions are you using: OpenERP, python, OS?

Back to top

brzopletic

Joined: 05 Aug 2010Posts: 5

Posted: Mon Aug 09, 2010 11:14 am Post subject:

First of all, I wish to thank you for your answer.Yes, I received the same two warnings adding the full path after calling python interpreter and there isno logo on opened OpenERP Survey form.I don't have any configuration file under /etc/ which belongs to openerp neither to server nor to theclient.Under /home/my_user/ is only one file belonging to OpenERP. That is ".openerprc" where I've inserted"local" in those two paths of "pixmaps" and "share" under [path] according your direction under stepno. 9.Versions of: - openerp 5.0.12 (server, client and web)- python 2.6- OS Ubuntu 10.04

Back to top

brzopletic

Joined: 05 Aug 2010Posts: 5

Posted: Mon Aug 09, 2010 11:49 am Post subject:

Problem is solved!After restarting computer and openerp-server with openuser I don,t have OpenERP Survey form andsuddenly everything goes fine without any warning or error.

Back to top

wuergler

Joined: 04 Feb 2009Posts: 36Location: Berne,Suisse/Switzerland

Posted: Mon Aug 09, 2010 8:37 pm Post subject:

Good that you got it solved!

To me it seemed a bit like .openerprc could not be found, perhaps by mistakenly (re)starting openerp-client with another user than the user the home folder of the correct .openerprc is associated with.

The survey form is normal though upon first launch.

Back to top

Display posts from previous: All Posts Oldest First Go

Open Object Forum Index -> Installation Questions All times are GMT + 2 Hours

Page 1 of 1

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

8 de 9 07/09/10 08:25

Page 9: Instalacion Paso a Paso

Jump to: Installation Questions Go

You cannot post new topics in this forumYou cannot reply to topics in this forum

You cannot edit your posts in this forumYou cannot delete your posts in this forum

You cannot vote in polls in this forum

Open Object - How-to: Basic Installation on Ubuntu... http://www.openobject.com/forum/topic17584.html...

9 de 9 07/09/10 08:25