Pragmatic – Leading provider of open source business applications OpenERP, Ruby on Rails, Node.js, Talend, jaspersoft  – Pragmatic
Beyonce Adams

Installation steps of Odoo 9

Click Here to Download Odoo 9

Step 1 :
First step to start is, make sure your server has all the latest versions & patches by doing an update:

You can use the below given two commands.


sudo apt-get update

sudo apt-get dist-upgrade

Step 2 :

We need to create an Odoo System User which will own and run the odoo application on our system.

This user is a system user, i have created this user here as home directory is reside in /opt/odoo with the help of below command.
sudo adduser –system –home=/opt/odoo –group odoo


Step 3 :
We can check wether we are able to login with newly created user with the below command.
sudo su – odoo -s /bin/bash


and check wethere we landed in the home directory /home/odoo by the command pwd.
By pressing exit, logout or ctrl+d come out from the user odoo.
Step 4 :
In this step we will install the database postgresql. With the help of below command.
sudo apt-get install postgresql
By default it will install postgres 9.3 on Ubuntu 14.04 LTS, if we want we can upgrade it with the required version.
We need to update the source list.
To install postgresql 9.4 follow the below steps.
Step 4.1
Create the new file pgdg.list under /etc/apt/sources.list.d directory and add the below line for repository.
Step 4.2
Import the repo key with below command.
wget –quiet -O – 

https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add –


Step 4.3
Updte the package list.
sudo apt-get update


Step 4.4
Once the package list is updated, we can search and install the required 9.4 version of postgres.
sudo apt-get install postgresql-9.4


Step 5 :
Once we have install postgres 9.4 version, login to postgres to we can configure the required database.
sudo su – postgres


Step 6 :
Here we create a new database user which has privilige to create and drop the database. We create the user name odoo here and password is of individual choice.
createuser –createdb –username postgres –no-createrole –no-superuser –pwprompt odoo

Enter password for new role: ********
Enter it again: ********


Step 7 :
once all steps performed, exit from the account, with below command.
exit


Step 8 :
Installation of required libraries.
We can install the libraries with below command.
sudo apt-get install python-pip python-dev libevent-dev gcc libxml2-dev libxslt-dev node-less libldap2-dev libssl-dev libpq-dev python-dev python-ldap libsasl2-dev


Odoo9 is depends on node-less package.
Once installing the system libraries we can install python libraries using pip. Create requirement.txtfile on the system.
Here is command which will change the directory to /tmp, get the official requirement.txt from
and install it in your system. it will reduce steps to install the python dependency to install odoo 9 in your system.
First move to /tmp directory.
sudo cd /tmp

wget https://raw.githubusercontent.com/odoo/odoo/9.0/requirements.txt && sudo pip install -r requirements.txt


Once it finished, all the dependancies for Odoo9 installation will be finished.
  
Step 9 :
For Qweb templating, we have to install wkhtmltopdf and we can download it from below links.
For 32 bit :
For 64 bit :
Download the required one as per version in /tmp directory.
And run the below command as per requirement.
For 32 bit :
sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-i386.deb
For 64 bit :

sudo dpkg -i /tmp/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb


Step 10 :
Now we will proceed to Odoo installation.

Download the latest Odoo9 with below command in the /opt/odoo directory.

sudo wget https://github.com/odoo/odoo/archive/9.0.zip
Unzip the downloaded file 

sudo unzip file_name

Rename the extracted folder to odoo

sudo mv Extracted_folder  odoo


Step 11 :
Configuration of Odoo.
Here we have to find the configuration file of odoo application and it is reside under
/opt/odoo/odoo/debian directory.
We have to copy this file and also need to change permission and ownership.
Below are the commands we can use for this.
sudo cp /opt/odoo/odoo/debian/openerp-server.conf /etc/odoo-server.conf

sudo chown odoo: /etc/odoo-server.conf

sudo chmod 640 /etc/odoo-server.conf




we can verify made changes with the below command

ll /etc/odoo-server.conf
with the above changes, /etc/odoo-server.conf file will be owned and writeable only by odoo user and group. Root has read permission on it.
Make below changes to allow odoo to use default addons.


In the configurtion file add the below line for addons_path.
addons_path = /opt/odoo/odoo/addons

Now we move towards to init script.
By default it is stored in  /opt/odoo/odoo/debian/init. Modyfy it set the proper daemon path and save it.
Copy it /etc/init.d dirctory and name it as odoo-server and also change ownership to odoo user and permit it to execuatable.
We also need to create the log file to store the logs with the permission that odoo user should write it.


Below are the commands.

sudo mkdir /var/log/odoo

cd /var/log/odoo

sudo nano odoo-server.log

Save the file and exit from it.


give the permission to writable by the odoo user.

sudo chmod 755 /var/log/odoo/odoo-server.log

sudo chown odoo:root -R /var/log/odoo/

So we have finished with the configuration part.

Step 12 :
Its the time to check our server

to start the server type the below command.

sudo /etc/init.d/odoo-server start

we can see the log file

sudo tail -f /var/log/odoo/odoo-server.log 


if everything is fine in log file, then we can go in brower with the ip or localhost if it configured locally.

http://IP_ADDRESS:8069

or

http://localhost:8069 

if configured locally.
To automatically start and stop the Odoo at the time of system sart and shut, run the below command.

sudo update-rc.d odoo-server defaults


SHARE | FOLLOW | SUBSCRIBE

Leave a Reply

Subscribe to Blog via Email.

Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Loading

Recent Comments

Related Posts