Setting up Odoo 8.0 for Ubuntu 14.04

Basic Installation

Neu Media Technology LLP, Administrator


SETTING UP ODOO 8.0 FOR UBUNTU 14.04

BASIC installation


Nicholas Thiang

Brought to you by Neu Media Technology



Installing Odoo 8.0 for the first time can be quite an arduous task, considering the myriad of instructions that is sprawled across the internet, particularly when they have gaps in them. Here we hope to present a holistic set of guidelines to successfully setup Odoo 8.0 for yourself, on Ubuntu 14.04.


  1. Install dependencies


Install General, PostgreSQL and Odoo dependencies


Steps

sudo apt-get update

sudo apt-get dist-upgrade


sudo apt-get -y install postgresql postgresql-contrib pgadmin3 net-tools gcc python-ldap postgresql-server-dev-all libxml2-dev libxslt1-dev python-ldb-dev libldap2-dev python-dev libsasl2-dev python-pip python-imaging python-unicodecsv


# Installing Python-Imaging

  1. install PIL (Python-Imaging).
    http://stackoverflow.com/questions/18504835/pil-decoder-jpeg-not-available-on-ubuntu-x64

  2. link freetype2 to freetype
    https://gist.github.com/shingonoide/8172291

  3. Upgrade Pillow
    sudo pip install --upgrade Pillow


  1. Setup PostgreSQL


(i) setup the DB user for Odoo


# setup new user to the database. Ideally, during real deployment, the password has to be very strong

sudo su - postgres -c "createuser --pwprompt --createdb --no-createrole --superuser [USERNAME]"


  1. Download Odoo


wget http://nightly.odoo.com/8.0/nightly/src/odoo_8.0.latest.tar.gz


  1. Unzip Odoo


tar xvf odoo_[version].tar.gz


  1. Go inside Odoo’s folder and install Odoo dependencies


sudo pip install -r requirements.txt


  1. Make sure wkhtmltopdf is installed (this is required for generating PDF reports)


Steps

Manually install wkhtmltopdf because Odoo uses version 12.0+, not the older version that comes with Ubuntu:

  1. get the file via wget from wkhtmltopdf website (wkhtmltopdf.org)

  2. install package

                     sudo dpkg -i <downloaded_package_name>

  1. install dependencies

                     sudo apt-get -f install

  1. either copy, or make symbolic link (ln -s)

   sudo cp /usr/local/bin/wkhtmltopdf /usr/bin

   sudo cp /usr/local/bin/wkhtmltoimage /usr/bin


  1. Setup Odoo Configuration File


(i) Generate the default configuration file


python odoo.py -s -c [CONFIG FILENAME]


# terminate the Odoo process with Ctrl-C


(ii) Modify contents


vim [CONFIG FILENAME]


Modify:

db_host = localhost # change if database resides on a different location

db_password = [DB USER PASSWORD]

db_user = [DB USERNAME]


  1. Run Odoo Server


python odoo.py -c [CONFIG FILENAME]


  1. Browse to Server


http://[SERVER_IP]:8069


Now that you’ve got Odoo 8.0 running, enjoy optimising and automating your business processes!


Note: This setup above is for development / trial purposes. If you want to set up Odoo as a service, that runs automatically when Ubuntu starts, stay tuned for our next blog post!


References

Ubuntu/Odoo

https://www.odoo.com/forum/help-1/question/importerror-no-module-named-setuptools-63406
http://stackoverflow.com/questions/26053982/error-setup-script-exited-with-error-command-x86-64-linux-gnu-gcc-failed-wit
https://www.odoo.com/forum/help-1/question/importerror-no-module-named-decorator-63302 http://askubuntu.com/questions/556667/how-to-install-wkhtmltopdf-0-12-1-on-ubuntu-server  

PostgreSQL

https://doc.odoo.com/install/linux/postgres/#setup-a-postgresql-user-for-openerp

http://www.liquidweb.com/kb/how-to-install-and-connect-to-postgresql-on-ubuntu-14-04/

https://doc.odoo.com/install/linux/postgres/#setup-a-postgresql-user-for-openerp