Super Spread Sheet S³

Or little computing tricks and hacks

Installing OpenERP

This is a detailed description of installing OpenERP in my Ubuntu machine.

sudo vi /etc/apt/sources.list

add this line:

deb http://nightly.openerp.com/7.0/nightly/deb/ ./

sudo apt-get update
sudo apt-get install openerp
(output saved in file)
This start as well the database server and the openerp server

I’m told to run this command as well:

sudo apt-get install openerp-server openerp-client pgadmin3

but the client does not install: Error message:

mancilla@ursus :~ $ sudo apt-get install openerp-client
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package openerp-client

so I’m just continuing. pgadmin3 installed.

(instructions from
https://doc.openerp.com/book/1/1_1_Inst_Config/1_1_Inst_Config_install/#installation-on-linux-ubuntu
)

Language
========
To make sure that all the labels are displayed in the right language. I might use French or Spanish.

sudo apt-get install language-pack-gnome-es-base
sudo apt-get install language-pack-gnome-fr-base

Setting up the database
=======================
$ sudo vi /etc/postgresql/8.4/main/pg_hba.conf

Replace the following line:

# “local” is for Unix domain socket connections only
local all all ident

with:

#”local” is for Unix domain socket connections only
local all all md5

except that in my pg_hba.conf file I don’t have ident but peer. Give that is local, is boils down to the same (http://www.postgresql.org/docs/9.1/static/auth-pg-hba-conf.html)
so in my case is:
Replace the following line:

# “local” is for Unix domain socket connections only
local all all peer

with:

#”local” is for Unix domain socket connections only
local all all md5

———————

then restart server. The instructions state:

sudo /etc/init.d/postgresql-8.4 restart
* Restarting PostgreSQL 8.4 database server [ OK ]

Except that in my ubuntu 13.04 is:

mancilla@ursus :~ $ sudo /etc/init.d/postgresql restart
* Restarting PostgreSQL 9.1 database server [ OK ]

not sure if it is PostgreSQL 9.1 or Ubunut 13.04

Moving on.
Must create a openerp user account for the web and I think database user.

$ sudo mkdir /home/openerp

$ sudo chown openerp.nogroup /home/openerp

and then
Create a user account called openerp with password “openerp” and with privileges to create Postgres databases:

sudo su postgres
postgres@ursus:/home/mancilla$ createuser openerp -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) y
Shall the new role be allowed to create more new roles? (y/n) n
postgres@ursus:/home/mancilla$

$ sudo su postgres

( not quite understand the sudo su part…)

from
http://www.howtoforge.com/forums/archive/index.php/t-3246.html
The “sudo” command allows users specified in a sudoers file which is usually located in the /etc directory to perform certain functions (again, as permitted by the sudoers file) that are normally reserved for the root user.

The “su” command is a “switch user” command.
In its simplest form, typing “su” will prompt you for the root password and if given correctly you get root privileges. Typing “su -” and giving the correct password gives you root’s privileges and environment. The “su” command can also be used to gain access to another “normal” user’s account if you have that user’s password. To do that you would type “su ” where is a valid normal user on that system.

Well in Ubuntu (I’m assuming you are using it) sudo su – gives you super user privlages for that account to make changes to and such. sudo su — gives you privialdges for the ENTIRE server… thats why some apps dont work for su – because the changes (like boot or some apps) will affect all users. Now that difference won’t affect you if you’re the admin or dont have any other users apart from you’re self but you can actually edit permssions (such as boot or yum/apt-get privaladges with a few scripts…..

$ createuser openerp -P

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

postgres@ursus:/home/mancilla$ exit
exit

or

$ exit
exit

intructions:
$ sudo vi /etc/openerp-server.conf
I get:
sudo vi /etc/openerp/openerp-server.conf

$ sudo /etc/init.d/openerp-server restart
Restarting openerp-server: openerp-server.

mancilla@ursus :~ $ sudo /etc/init.d/openerp restart
Restarting openerp-server: Stopping openerp-server: openerp-server.
Starting openerp-server: openerp-server.

OpenERP is now up and running, connected to Postgres database on port 5432 and listening on ports 8069 and 8070

$ sudo cat /var/log/openerp.log
here:
sudo cat /var/log/openerp/openerp-server.log

mancilla@ursus :~ $ ps auxww | grep -i openerp
openerp 18534 0.0 0.9 489624 78192 ? Sl 09:23 0:00 /usr/bin/python /usr/bin/openerp-server –config=/etc/openerp/openerp-server.conf –logfile=/var/log/openerp/openerp-server.log

$ ps uaxww | grep -i openerp
openerp 5686 0.0 1.2 84688 26584 pts/7 Sl+ 12:36 0:03 /usr/bin/python ./openerp-server.py

mancilla@ursus :~ $ sudo lsof -i :8070
mancilla@ursus :~ $ sudo lsof -i :8069
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
openerp-s 18534 openerp 3u IPv4 3946949 0t0 TCP *:8069 (LISTEN)

but for them it should be:

$ sudo lsof -i :8069
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 5686 openerp 3u IPv4 116555 0t0 TCP *:8069 (LISTEN)

$ sudo lsof -i :8070
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
python 5686 openerp 5u IPv4 116563 0t0 TCP *:8070 (LISTEN)

So I only have it running on port 8069 …

Start the OpenERP client from the browser.

http://localhost:8069

which directs me immediately to the creation of a database, under the OpenERP database management section.

Once a database is created (all is needed to begin with is a name and a password) you are directed to install the modules, in the OpenERP App section.

Now what!?

Installing warehouse management module …

Product -> Product by Catergory but there is no new or create. Just click on “Saleable”

NOTE
Before loging out, go to users and click on Administrator. This will give an option to changes the password, without giving the old one, as I think there isn’t one. So if you log out, chances are you will not be able to log back in.

Advertisements

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

%d bloggers like this: