How to install Odoo 17 on Ubuntu

Step-by-Step guide for installation of Odoo 17 on Ubuntu
How to install Odoo 17.0 in Ubuntu

Odoo 17, most  recent  stable  iteration of odoo presents a plethora of functionalities ranging from customer and product management to sales, inventory, accounting, project oversight, and order handling, thereby catering to vital aspects of business operations. Notably, Odoo 17 utilizes a PostgreSQL database to store its data, a component seam-lessly integrated during the installation process.

In this tutorial, we'll walk you through the process of setting up and configuring Odoo 17 on an Ubuntu 22.04 system.

Prerequisites: Before we begin, make sure you have the following:

  • Ubuntu 22.04 OS and at least 2GB of RAM with Python version 3.10 or higher.
  • A user account with 'sudo' privileges.

Note: It's advisable to perform these steps using a user with sudo privileges rather than the root user for security reasons.


Step1: Update Packages 

Ensure your Ubuntu packages are up to date by running the following commands:

$ sudo apt-get update

$ sudo apt-get upgrade


Step 2. Install Required Python Libraries

Install the necessary dependencies for Odoo 17 on Ubuntu 22.04 with the commands:

python3-pip: The Python package installer is needed to install Python dependencies.

$ sudo apt-get install python3-pip

libxml2-dev, libxslt-dev, libldap2-dev, libsasl2-dev, libssl-dev: These development libraries are required for certain Python packages used by Odoo.

$ sudo apt-get install libxml2-dev libxslt-dev libldap2-dev libsasl2-dev libssl-dev


build-essential: This package includes essential tools like gcc and make, which are necessary for compiling certain Python packages.

$ sudo apt-get install build-essential


Step 3: Set up PostgreSQL: 

PostgreSQL: Odoo uses PostgreSQL as its database backend, Ensure that you have PostgreSQL installed on your system.

Install PostgreSQL and its dependencies:

$  sudo apt install postgresql postgresql-contrib


PostgreSQL will be automatically started after installation, check the status of the PostgreSQL service by running:

$ systemctl status postgresql

Create a PostgreSQL user named odoo with superuser privileges.
$  sudo su - postgres -c "createuser -s odoo"


Step 4. Install NPM and CSS plugins

$  sudo wget $ sudo apt-get install -y npm

$ sudo ln -s /usr/bin/nodejs /usr/bin/node

$ sudo npm install -g less less-plugin-clean-css

$ sudo apt-get install -y node-less


Step 5: Install Wkhtmltopdf
Wkhtmltopdf: Odoo uses Wkhtmltopdf for generating PDF reports. Odoo 17 typically requires a specific version of Wkhtmltopdf, so check the compatibility requirements.

$  sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb


Installing Wkhtmltopdf:

$  sudo wget $ sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb

$ sudo apt install -f

Step 6: Clone odoo-17 from github

$  sudo wget $ git clone https://github.com/odoo/odoo.git --branch 17.0 --depth 1


Create and activate virtualenv:

Navigate to the directory where you want to create virtualenv, for example creating a virtual environment named ‘venv’:

$  virtualenv -p python3 venv

$  source venv/bin/activate


Install Requirements.txt for odoo:

$ pip3 install -r odoo17/requirements.txt


Step 7: Prepare for Add-ons: 

Create a directory for third-party add-ons:

$  mkdir /opt/odoo17/odoo17/custom-addons

$ exit



Step 8: Configure Odoo:

Navigate to the directory where you want to store the odoo.conf file. Here i have chosen, odoo.conf from debian folder,

Inside the odoo.conf file, you'll define various settings for your Odoo instance. Here's a basic example:

[options]
; Replace the placeholder values with your PostgreSQL database details

db_host = localhost

db_port = 5432

db_user = odoo

db_password = your_database_password


addons_path = /path/to/addons,/path/to/custom-addons


; Set the Odoo addons path where your custom addons are located




Step 9:Test the Installation

Run odoo server using odoo conf command, within odoo directory:

$ ./odoo-bin -c debian/odoo.conf


Visit http://<your_domain_or_IP_address>:8069 in your web browser to verify that Odoo 17 is installed correctly. You should see the Odoo 17 start page. 

Once the server runs you need to create the database from Odoo database manager, and remember the email and password.


Congratulations! You've successfully installed Odoo 17 on Ubuntu 22.04.




in Odoo
How to install Odoo 17 on Ubuntu
Swati Meena 12 March 2024
Share this post
Tags
How to install Odoo 16 on Ubuntu
Step-by-Step guide for installation of Odoo 16 on Ubuntu