Howto install Odoo on Debian 7 64bit

This is an attempt at shortening the installation time of Odoo (OpenERP 7) on a pristine Linux Debian system. In particular, we'll execute this procedure on a 2GB RAM VM from Digital Ocean, a recent, cheap and efficiente hosting provider. First off, you'll need to install PostgreSQL. This is important, as the Debian package for Odoo does not install nor configure postgresql at all. Note that defining your first users with postgresql is possibly one of the most frustrating thing in the history of computation, so hang in there and follow these steps carefully.
$ sudo apt-get install postgresql
$ sudo su postgres
postgres$ psql
postgres=# CREATE USER odoo WITH PASSWORD 'odoo';
postgres=# CREATE DATABASE odoo OWNER odoo;
postgres=# ALTER USER odoo CREATEDB
postgres=# q
This last command gets you out of PostgreSQL. Now try to connect as the user you just created:
psql -U odoo -W odoo -h localhost
If you don't use "-h localhost", you will probably get an error like this:
psql: FATAL:  Peer authentication failed for user "odoo"
Don't panic. Locate your /etc/postgresql/9.1/main/pg_hba.conf file, find the "local all all peer" line and change it to "local all all trust", then reload postgresql:
postgres$ exit
$ sudo vim /etc/postgresql/9.1/main/pg_hba.conf// find and edit the line that says "local     all     all     peer". Change it to "local all all trust", save and exit
$ sudo service postgresql reload
If you know what you're doing (which is always better), you can leave things as they are (by default) and connect with the "-h localhost". That's just fine. Now you should be able to connect as user "odoo" (see above). We can now install the basic layers of Odoo itself (but first its dependencies):
$ sudo apt-get install python-dateutil python-feedparser python-gdata python-ldap 
    python-libxslt1 python-lxml python-mako python-openid python-psycopg2 
    python-pybabel python-pychart python-pydot python-pyparsing python-reportlab 
    python-simplejson python-tz python-vatnumber python-vobject python-webdav 
    python-werkzeug python-xlwt python-yaml python-zsi
# wget
# sudo dpkg -i openerp_7.0-latest-1_all.deb
Note that the "" at the end of each line is only a special character for continuation from one line to another. You can also remove those characters and put all the packages on one single line, this will work as well. Make sure Odoo is present by asking the options for the command-line executable:
openerp-server -h
It should *not* return a "command not found" error, but rather a large list of possible commands. The default configuration file for Odoo is /etc/openerp/openerp-server.conf. It is much easier to edit it now and change the settings, and avoid doing it later. The default config file looks like this;
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = openerp
db_password = openerp
Change it to something like this:
; This is the password that allows database operations:
admin_passwd = some_kickass_password
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
Now we'll ask Odoo to install its database so we can start using it. If you used all the default options, then you should be able to start it *just* like that:
sudo service openerp stop
sudo service openerp start
To try it out, connect your browser on localhost (if you installed it on your computer) or to the IP or domain of the server where you installed it, but on port 8069 (the default for Odoo).
This should load the general Odoo installer. It will ask you for the admin password (some_kickass_password you configured in the config file), then for a database name (whatever you like) and a password (odoo). It will then proceed to create your database for one OpenERP instance. This will take some time, so relax and leave it be for a while. In the end, it will show you the apps section. Choose whichever you like and let it process the database. The rest is up to you. If you are wondering what other configuration options can be set, a very good reference is a page on vionblog. It helped me figure out that one central reference point for OpenERP/Odoo options is the /usr/share/pyshared/openerp/tools/ file (do not modify it, just look). If you want to configure OpenERP to wor on HTTPS, you should follow this guide. You can also modify Odoo's CSS style with this guide.


[…] Howto install Odoo on Debian 7 64bit | BeezNest - N°1 Chamilo. – Aug 1, 2014. If you don't use “-h localhost”, you will probably get an error like this:. It will then proceed to create your database for one OpenERP instance. […]