Вы находитесь на странице: 1из 12

8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS?

• Atul Arvind

Atul Arvind Home About Blog

https://atularvind.com/install-odoo-10-in-ubuntu/ 1/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

O
Atul Arvind
doo 10 is released on 5th Oct 2016, this page will guide you to install Odoo 10 in ubuntu 16.04 LTS. There
Home About Blog
can be many blogs and several ways to install the odoo, this page will help you to install odoo manually.

Prepare Ubuntu
Make sure you have sudo access or logged in as root. to log in as a root you need to run below command and
provide the system password.

sudo su

We will update the ubuntu with the latest version of the packages and perform the function of the upgrade.
below command will do that for you.

sudo apt-get update && sudo apt-get dist-upgrade

Add system user


Now you need to create a system user to run the odoo server below command will add the user “odoo”, creates
the home path

sudo adduser --system --quiet --shell=/bin/bash --home=/opt/odoo --group odoo

The user should also be added to the sudo’ers group.

sudo adduser odoo sudo

https://atularvind.com/install-odoo-10-in-ubuntu/ 2/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

Atul Arvind Home About Blog

Install & Prepare Postgres


Odoo uses Postgres as the database layer, below command will install Postgres (version 9.5.4 is default in
ubuntu 16.04)

apt-get update postgresql -y

After installing Postgres check the version of the Postgres using

psql --version

Now depending on the version you need to install postgresql-server-dev, if your version is 9.5.3 then 9.5 and if
9.4.0 then 9.4, run the below command

sudo apt-get install postgresql-server-dev-9.5

After installing odoo we will create user “odoo” in Postgres, for that you need to log into Postgres rst using

su postgres

and after that create Postgres user for odoo 10, it will prompt for the password of the new user.

createuser --createdb --username postgres --superuser --pwprompt odoo

Install required packages


https://atularvind.com/install-odoo-10-in-ubuntu/ 3/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

In order to run the Odoo, you need several packages & python libs installed in ubuntu.
Atul Arvind
sudo apt-get install wget git python-pip python-dev gdebi-core \
Home About Blog

node-clean-css node-less python-gevent libevent-dev gcc \


libxml2-dev libxslt-dev libldap2-dev libssl-dev libsasl

Now we will install the python libs which is required by the odoo 10. for that we will fetch the requirement.txt
le from the GitHub odoo 10 branch raw source and install using the pip(python package management
system). below command will do that for you.

cd /tmp && wget https://raw.githubusercontent.com/odoo/odoo/10.0/requirements.txt && sudo pip instal

Install wkhtmltopdf
wkhtmltopdf is required in odoo to print the reports. depending on your OS bit you can install wkhtmltopdf for
odoo 10.
How do I check if I have a 32-bit or a 64-bit OS?

uname -i

if you get i386 or i586, i.e OS is 32 bit


if you get x86_64, i.e OS is 64 bit

 For 64 bit architecture

https://atularvind.com/install-odoo-10-in-ubuntu/ 4/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

 For 32 bit architecture


Atul Arvind Home About Blog

Get Odoo 10 source


Now we will fetch the odoo source using GitHub. or you can also get the nightly
source(https://nightly.odoo.com/10.0/nightly/src/)
below command will clone the git odoo 10 source code in /opt/odoo directory

sudo git clone --depth 1 --branch 10.0 https://www.github.com/odoo/odoo /opt/odoo/

After getting the source change the permission for the odoo source using

sudo chown -R odoo:odoo /opt/odoo/

Con gure Odoo 10


Default con guration le for the odoo 10 will be under /opt/odoo/debian/openerp-server.conf, we will copy
that le and put that under /etc/odoo/
below command will do that for you.

sudo mkdir /etc/odoo && cd /etc/odoo && sudo cp /opt/odoo/debian/odoo.conf /etc/odoo/odoo-server

we will edit the odoo 10 con gureation le using

https://atularvind.com/install-odoo-10-in-ubuntu/ 5/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

nano /etc/odoo/odoo-server.conf

Atul
andArvind
change the parameters according to your system Home About Blog

[options]
; This is the password that allows database operations:
admin_passwd = suerp@dmin
db_host = localhost
db_port = 5432
db_user = odoo
db_password = Postgr3s_odoo_passw0rd
addons_path = /opt/odoo/addons

For more info : See Odoo con guration parameters


Now we will provide proper permission to the odoo 10 con g le using below command

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


\&& sudo chmod 640 /etc/odoo/odoo-server.conf

ATUL ARVIND
Place init script
RECENT POSTS PAGES TAGS
Init script is used to start and stop the odoo server with proper con guration. we will copy the init le place it
Hello, I am a Odoo Setup
into /etc/init.d/ Linux Odoo
using Home Development Linux Odoo

developer & consultant Development Environment About Odoo 10


cp /opt/odoo/debian/init /etc/init.d/odoo-server
Install Odoo 10 in Ubuntu Contact
Now we will edit the le and change the DEMON path from the le to /opt/odoo/odoo-bin using
16.04 LTS?
Blog
sudo nano /etc/init.d/odoo-server
Google Keep, Best
Evernote Alternative
https://atularvind.com/install-odoo-10-in-ubuntu/ 6/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

and change the path of a demon from


Atul Arvind
DAEMON=/usr/bin/odoo
Home About Blog

© 2017 Atul Arvind. to      

DAEMON=/opt/odoo/odoo-bin

and will provide proper permission to the le using

sudo chmod 755 /etc/init.d/odoo-server \


&& sudo chown root: /etc/init.d/odoo-server

We will create log le based on init le using below command

sudo mkdir /var/log/odoo && sudo touch odoo-server.log

and will provide proper permission to the odoo 10 server log le

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

Test Odoo server


now it’s time to get the result of hard work! to start the odoo 10 server type

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

and you can check the log using

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

https://atularvind.com/install-odoo-10-in-ubuntu/ 7/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

press ctrl + c to exit


Atul
andArvind
if the server is local type the 127.0.0.1:8069 in the browser or your server’sHome About
public_ip:8069 Blog

for the rst time, you will see database manager to create your rst database.
Now stop the server using

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

And check the log le again to make sure odoo has stopped properly.

Automize Odoo Service


If everything working well we can do an entry of odoo-server in update-rc.d which will automatically start &
stops the odoo server along with ubuntu

sudo update-rc.d odoo-server defaults

reboot your server and check for the odoo service using ps -ax | grep odoo.
you can also con gure odoo with Nginx or apache to make it work with your domain.
Give me a comment if you stuck at any point, I will be happy to help you & revert back to you as soon as
possible.

 Love 9  Share  Tweet  Share  Share  Pin

https://atularvind.com/install-odoo-10-in-ubuntu/ 8/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

Atul Arvind Home About Blog

Next Post

Google Keep, Best Evernote Altern

Join the discussion

4 Comments

mohannad Reply
February 6, 2017 at 11:02 am

hello
I would like to say great tutorial.
but I have a small problem, the master password does not use the password in the con g le and
https://atularvind.com/install-odoo-10-in-ubuntu/ 9/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

when I set it from odoo it will be deleted after a restart.


Atul Arvind
what did I miss? Home About Blog

Atul Arvind Reply


February 12, 2017 at 6:44 am

Hello Mohannad,

Thanks for your compliments!

have you set the

admin_passwd = master@admin@password?

in the con g le? have you checked the permission to the con g le?

Aditya Rajak Reply


March 16, 2017 at 4:07 pm

Hello Atul, It was a very good stu . But unfortunately, I am facing an error while starting the server
using the command (sudo /etc/init.d/odoo-server start), which says, failed
(root@CISM509:/etc/odoo# sudo /etc/init.d/odoo-server start

https://atularvind.com/install-odoo-10-in-ubuntu/ 10/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

[….] Starting odoo-server (via systemctl): odoo-server.serviceFailed to start odoo-server.service: Unit


Atul Arvind
odoo-server.service not found. Home About Blog

failed!
). I have already checked the le in the directory, le are also there, I am not able to understand what’s
wrong here. Please help me.

Install Odoo 10 in Ubuntu 16.04 LTS • Tech Heliconia Reply


April 1, 2017 at 7:17 am

There are many ways to install Odoo, you can install Odoo manually by running one by one command,
see the article here : https://tech.heliconia.in/insight/odoo/install-odoo-10-in-ubuntu-16-04-lts/

Leave a Reply

https://atularvind.com/install-odoo-10-in-ubuntu/ 11/12
8/20/2017 Install Odoo 10 in Ubuntu 16.04 LTS? • Atul Arvind

Atul Arvind Home About Blog

Name * Email * Website

SUBMIT COMMENT

https://atularvind.com/install-odoo-10-in-ubuntu/ 12/12

Вам также может понравиться