| AMMAN-JORDAN

How to install odoo 11 on ubuntu 18.04 with domain configure

By

How to deploy odoo 11 on ubuntu 18.04 with domain configure

how to install odoo on ubuntu
Odoo 11 Installation on ubuntu 18.04 with domain configured
By

Ubuntu 18.04

To Install Odoo Version 11 on ubuntu server :

First Open Terminal on your ubuntu 18.04 server Start :

  • sudo apt-get update
  • sudo apt-get upgrade
  • sudo apt install python3-pip

install postgresql database :-

  • sudo apt-get install postgresql postgresql-contrib

install odoo 11 community version :-

  • git clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 --single-branch
  • cd odoo

install python packages needed to run odoo 11

  • sudo apt install python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev
  • pip3 install -r requirements.txt

Install npm :-

  • sudo apt-get install -y npm
  • sudo npm install -g less

Now Create User On Postgresql Database (With Name odoo as you see below)

  • sudo su - postgres

  •  
    
    createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo

It will ask you to put password for the user

  • psql
  • Alter user odoo with superuser;
  • \q
  • exit

Now install wkhtmltopdf which is open source command line tools to render HTML into PDF and various image formats. used it Qweb reports in odoo

  • cd /tmp

  • sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb 
  • sudo apt-get install -y xfonts-75dpi
  • sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb

Now create odoo log directory for the odoo log file follow the commands :-

  • sudo mkdir /var/log/odoo

Now we will work on odoo configuration file :-

  • sudo cp /root/odoo/debian/odoo.conf /etc/odoo.conf
  • sudo nano /etc/odoo.conf

how to install odoo-13 on ubuntu 18.04 odoo.conf

Add these information as you see in this image

db_port default port for postgresql

db_user database user as we create is in database

db_password put your database user password

addons_path put your odoo/addons path

  • sudo nano /etc/systemd/system/odoo.service

Now add the following information from the image for running odoo as a service :-

how to install odoo-13 on ubuntu 18.04 odoo.service

  • sudo systemctl enable odoo.service
  • sudo systemctl start odoo.service

Now check the status of your odoo

  • sudo systemctl status odoo.service

and you can check odoo log file any errors:-

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

Open your browser and put http://YourServerIP:8069/

Now configure domain name for odoo :-

install nginx :-

  • sudo apt-get install nginx
  • sudo nano /etc/nginx/sites-available/odoo

Now add these information inside the file and add your website ip address and your domain name is :-

  • upstream backend-odoo {
     server 161.35.2.47:8069;
    }
    server {
     listen 80;
     server_name 161.35.2.47;
     return 301 http://itjordon.com$request_uri;
    }
    server {
     listen 80;
     server_name itjordon.com www.itjordon.com;
     location / {
     proxy_pass http://backend-odoo;
    }
    }
  • sudo ln -s /etc/nginx/site-available/odoo /etc/nginx/sites-enabled
  • sudo systemctl restart nginx

Done ! Domain

Hint only : For your information your domain and cloud host must be linked as the image example:-

update nameservers from domain name system side

update DNS records from cloud host side

© 2020 PyOdoo.

TOPICS:  Odoo