HomeLinuxThe way to Simply Set up Odoo Neighborhood Version in Ubuntu

The way to Simply Set up Odoo Neighborhood Version in Ubuntu


Odoo is a full-featured, extensible open-source ERP (Enterprise Useful resource Planning) software program constructed utilizing Python and PostgreSQL database for knowledge storage.

It’s a suite of open-source enterprise purposes, that consists of a number of apps below numerous classes akin to web site, gross sales, funds, operations, manufacturing, human useful resource (HR), communication, advertising, and customization instruments.

The principle apps embrace an internet site builder, CRM (Content material Relationship Supervisor), a fully-functional eCommerce, a advertising app, an HR app, an accounting instrument, a list app, a degree of sale app, a undertaking administration app, and plenty of extra.

On this article, we’ll present you methods to set up the most recent model of Odoo Neighborhood Version (CE) on Ubuntu 22.04, Ubuntu 20.04 or Ubuntu 18.04.

Set up PostgreSQL on Ubuntu

1. To run Odoo correctly, you want a PostgreSQL database server, which could be put in from the default repositories as proven.

$ sudo apt replace
$ sudo apt set up postgresql

2. As soon as the PostgreSQL set up is full it’s essential examine a number of issues. Throughout the set up course of, the installer is configured to begin the postgresql service and allow it to mechanically begin when the server is rebooted. To examine if the service is up and working, and is enabled, run the next systemctl instructions.

$ systemctl standing postgresql
$ systemctl is-enabled postgresql
Check PostgresSQL Status
Test PostgresSQL Standing

Set up Wkhtmltopdf on Ubuntu

3. Subsequent, it’s essential set up Wkhtmltopdf – which is an open-source, small command-line utility that converts an HTML web page to a PDF doc or a picture utilizing WebKit.

The Odoo requires wkhtmltopdf v0.12.05 which isn’t supplied within the Ubuntu repositories. So it’s essential set up it manually by downloading wkhtmltox .deb bundle from the wkhtmltopdf web site on your Ubuntu launch.

$ wget https://github.com/wkhtmltopdf/packaging/releases/obtain/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
$ sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb

4. Confirm that Wkhtmltopdf is efficiently put in in your machine.

$ which wkhtmltopdf
$ which wkhtmltoimage
Verify Wkhtmltopdf Installation
Confirm Wkhtmltopdf Set up

Set up Odoo in Ubuntu

5. We might be utilizing the official Odoo repository to put in Odoo Neighborhood Version by executing the next instructions.

$ wget -q -O - https://nightly.odoo.com/odoo.key | sudo gpg --dearmor -o /usr/share/keyrings/odoo-archive-keyring.gpg
$ echo 'deb [signed-by=/usr/share/keyrings/odoo-archive-keyring.gpg] https://nightly.odoo.com/16.0/nightly/deb/ ./' | sudo tee /and many others/apt/sources.checklist.d/odoo.checklist
$ sudo apt-get replace && sudo apt-get set up odoo

6. As soon as Odoo is put in, you may confirm the service is up and working and is enabled to mechanically begin at system boot.

$ systemctl standing odoo
$ systemctl is-enabled odoo
Check Odoo Status
Test Odoo Standing

7. By default, Odoo listens on port 8069 and you’ll confirm it utilizing the netstat or ss instruments as follows. That is one other technique to verify that Odoo is up and working.

$ sudo netstat -tpln
OR
$ sudo ss -tpln
Verify Odoo Port
Confirm Odoo Port

Set up and Configure Nginx as a Reverse Proxy for Odoo

8. To allow customers to entry the Odoo net interface with out typing the port quantity, you may configure Odoo to be accessed utilizing a sub-domain utilizing an Nginx reverse proxy atmosphere.

To configure Nginx as a Reverse Proxy for Odoo, first, it’s essential set up Nginx as proven.

$ sudo apt set up nginx

9. When the set up is full, examine if the Nginx service is up and working, is enabled as properly.

$ systemctl standing nginx
$ systemctl is-enabled nginx
Check Nginx Status
Test Nginx Standing

10. Subsequent, create an Nginx server block for Odoo within the file /and many others/nginx/conf.d/odoo.conf as proven.

$ sudo vi /and many others/nginx/conf.d/odoo.conf

Then copy and paste the next configuration into the file. This can be a easy configuration enough to run your Odoo system, you may add extra configurations by studying the Nginx documentation to fit your atmosphere.

server {
        pay attention      80;
        server_name odoo.tecmint.lan; 
        access_log /var/log/nginx/odoo_access.log; 
        error_log /var/log/nginx/odoo_error.log; 
        proxy_buffers 16 64k; 
        proxy_buffer_size 128k; 

location / { 
        proxy_pass http://127.0.0.1:8069; 
        proxy_redirect off; 
        proxy_set_header X-Actual-IP $remote_addr; 
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
        proxy_set_header Host $http_host;
} 

location ~* /net/static/ { 
        proxy_cache_valid 200 60m; 
        proxy_buffering on; 
        expires 864000; 
        proxy_pass http://127.0.0.1:8069;
} 

gzip on; 
gzip_min_length 1000;
}

11. After saving the modifications within the file. Test the Nginx configuration construction for any syntax errors.

$ sudo nginx -t
Check Nginx Configuration for Errors
Test Nginx Configuration for Errors

12. Now restart the Nginx service to impact the latest modifications.

$ sudo systemctl restart nginx

13. Importantly, you probably have enabled the UFW firewall service enabled and working, it’s essential enable HTTP and HTTPS requests by way of the firewall to the Nginx server earlier than beginning to entry the Odoo net interface.

$ sudo ufw enable http
$ sudo ufw enable https
$ sudo ufw reload

Accessing Odoo Internet Administration Interface

14. Subsequent, open an internet browser and use the next handle to entry the Odoo net administration interface.

http://SERVER-IP-Deal with
OR
http://Server-hostname

Await the interface to load, as soon as it has, it’s essential create a database for Odoo. Enter a database title, administrator e mail handle, and password. Then choose the language and nation. You may choose to load pattern knowledge or not. Then click on Create Database.

Create Database for Odoo
Create a Database for Odoo

15. Then the above web page will redirect to the administrator’s dashboard displaying the accessible Odoo apps, as proven within the following screenshot. Click on on the Set up or Improve button on an app to put in or improve it respectively. To log off, click on on Admin dropdown ==> Sign off.

Odoo Apps
Odoo Apps

16. The next screenshot exhibits the Odoo login interface. Use the credentials created in step 14 above to log in.

Odoo Web Login
Odoo Internet Login

From the screenshot, you may see that the system will not be safe as it’s working on plain HTTP. So it’s essential allow HTTPS, particularly for a manufacturing atmosphere. You should utilize Let’s Encrypt which is free: The way to Safe Nginx with Let’s Encrypt on Ubuntu and Debian.

That’s all for now! You will have put in Odoo CE in your Ubuntu server. Though Odoo apps combine seamlessly out-of-the-box to supply an achieved, built-in ERP resolution, every software could be deployed as a stand-alone software.

For extra info, see the Odoo documentation.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments