Odoo, a versatile suite of business management tools, offers several installation methods tailored to different use cases and technical requirements. This comprehensive guide outlines the various options available for deploying Odoo 16.0, ensuring you can choose the most suitable approach for your specific needs, whether for production environments, development, or simple trials.

Installation Options Overview

  • Online: This is the simplest and quickest way to begin using Odoo, ideal for production deployments and initial evaluations.
  • Packaged Installers: These installers are well-suited for testing Odoo, developing custom modules, and can serve as a foundation for long-term production use, though they may require additional deployment and maintenance efforts.
  • Source Install: Offering significant flexibility, this method allows for running multiple Odoo versions on the same system. It is excellent for module development and can form the basis for production deployments requiring fine-grained control.
  • Docker: For users accustomed to using Docker for development or deployment, an official Docker base image is readily available to streamline the process.

Odoo Editions

Odoo is available in two distinct versions: the Community Edition and the Enterprise Edition. Each offers a different scope of features and accessibility:

  • The Enterprise Edition is available through Odoo Online, and its source code access is exclusively granted to Enterprise customers and partners.
  • The Community Edition is freely accessible to anyone, providing a robust open-source foundation.

Should you currently be utilizing the Community version and wish to upgrade to the Enterprise Edition, please consult the guide on Switch from Community to Enterprise (note: this does not apply to Source installs).

Online Deployment Options

Demo Instances

For a quick, commitment-free introduction to Odoo, demo instances are an excellent starting point. These are shared instances with a limited lifespan of a few hours, perfect for exploring Odoo\'s interface and features without any local installation. All you need is a web browser.

Odoo Online

Odoo Online offers private instances that are fully managed and migrated by Odoo S.A. It provides a straightforward way to start using Odoo, with initial free access. This option is ideal for discovering and testing Odoo, as well as performing non-code customizations (those not involving custom modules or the Odoo Apps Store), all without the need for a local installation. Like demo instances, Odoo Online only requires a web browser and is suitable for both testing and long-term production use.

Packaged Installers

Odoo provides convenient packaged installers for various operating systems, including Windows, Debian-based distributions (such as Debian and Ubuntu), and RPM-based distributions (like Fedora, CentOS, and RHEL). These installers are available for both the Community and Enterprise versions of Odoo.

While these packages automate the setup of all necessary dependencies (for the Community version), keeping them updated might require periodic attention.

Official Community packages, complete with all essential dependency requirements, can be found on our nightly server. Both Community and Enterprise packages are available for download from our download page. Please note that you must be logged in as a paying customer or partner to download the Enterprise packages.

Windows Installation

  1. Download the installer from either our nightly server (Community only) or the download page (for any edition).
  2. Execute the downloaded file to begin the installation process.

Warning: On Windows 8 and newer versions, you might encounter a "Windows protected your PC" warning. To proceed, click on More Info and then select Run anyway.

  1. Accept the User Account Control (UAC) prompt when it appears.
  2. Follow the on-screen instructions through the various installation steps.

Upon completion of the installation, Odoo will automatically start.

Linux Installation

Prepare for Linux Installation

Odoo requires a PostgreSQL server to function correctly. The default configuration for the Odoo Debian package assumes the PostgreSQL server is on the same host as your Odoo instance. To install the PostgreSQL server, execute the following command in your terminal:

$ sudo apt install postgresql -y

Warning: The `wkhtmltopdf` tool is not installed via `pip` and must be manually installed. Ensure you use version 0.12.5 to ensure proper support for headers and footers in generated reports. For more detailed information on various versions and installation specifics, please refer to our wiki.

Using the Odoo Repository

Odoo S.A. provides a dedicated repository compatible with Debian and Ubuntu distributions. To install Odoo Community Edition using this repository, run the following commands:

$ 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 /etc/apt/sources.list.d/odoo.list
$ sudo apt-get update && sudo apt-get install odoo

Once installed, you can keep your Odoo installation up-to-date by using the standard `apt-get upgrade` command.

Note: Currently, there is no nightly repository available for the Enterprise Edition.

Installing from Distribution Package

Alternatively, instead of utilizing the repository, you can download the Debian packages directly for both the Community and Enterprise editions from the official download page.

After downloading, execute the following commands as root to install Odoo:

# dpkg -i <path\_to\_installation\_package> # this probably fails with missing dependencies
# apt-get install -f # should install the missing dependencies
# dpkg -i <path\_to\_installation\_package>

This process will install Odoo as a system service, create the necessary PostgreSQL user, and automatically start the Odoo server.

Warning:

  • The `python3-xlwt` Debian package is not available in Debian Buster or Ubuntu 18.04. This Python module is essential for exporting data into XLS format. If this feature is required, you will need to install it manually.
  • The `num2words` Python package is also absent in Debian Buster and Ubuntu 18.04. Without it, textual amounts will not be rendered by Odoo, which could cause issues with the `l10n_mx_edi` module. If this feature is necessary, install it manually with:
    $ sudo pip3 install num2words

Source Installation

A source "installation" of Odoo involves running the application directly from its source code rather than using a traditional installer. This method is particularly beneficial for module developers, as it provides easier access to the Odoo source code compared to packaged installations.

Running Odoo from source offers greater flexibility and explicitness in starting and stopping the application, bypassing the services configured by packaged installations. It also allows for overriding settings using command-line parameters, eliminating the need to modify configuration files directly. Furthermore, this approach grants enhanced control over the system\'s setup, making it simpler to maintain and run multiple Odoo versions concurrently.

Fetching the Odoo Sources

You can obtain the Odoo source code using two primary methods: as a zip archive or through Git.

Downloading Archive Sources

Cloning with Git

This method requires Git to be installed on your machine and a basic understanding of Git commands. When cloning a Git repository, you typically choose between HTTPS and SSH. If you are unsure, HTTPS is generally the most straightforward option. However, if you are following the Getting started developer tutorial or intend to contribute to the Odoo source code, SSH is recommended.

C:\> git clone https://github.com/odoo/odoo.git
C:\> git clone https://github.com/odoo/enterprise.git

Note: The Enterprise Git repository does not contain the complete Odoo source code; it is solely a collection of additional add-ons. The core server code resides within the Community version. To run the Enterprise version, you must execute the server from the Community version and set the `addons-path` option to include the folder containing the Enterprise add-ons. It is essential to clone both the Community and Enterprise repositories to establish a functional Odoo Enterprise installation. Refer to Editions for details on accessing the Enterprise repository.

Preparing for Source Installation

Python Environment Setup

Odoo requires Python version 3.7 or later to operate. Please visit Python’s download page to download and install the latest compatible version of Python 3 on your system.

During the installation process, ensure you check the option to Add Python 3 to PATH. Afterwards, click on Customize Installation and verify that pip is selected for installation.

Note: If Python 3 is already installed, confirm that its version is 3.7 or higher, as earlier versions are not compatible with Odoo. Also, verify that pip is installed for your chosen Python version.

PostgreSQL Database Setup

Odoo relies on PostgreSQL as its database management system. Download and install PostgreSQL, ensuring you use a supported version (12.0 or later).

By default, the only user is `postgres`, but Odoo disallows connecting as this user. Therefore, you must create a new PostgreSQL user:

  1. Add PostgreSQL’s `bin` directory to your system’s `PATH` environment variable (the default path is typically `C:\Program Files\PostgreSQL\<version>\bin`).
  2. Create a PostgreSQL user with a password using the pgAdmin graphical user interface:
    1. Open pgAdmin.
    2. Double-click the server to establish a connection.
    3. Select the \'Login/Group Roles\' option or equivalent.
    4. Enter the desired username in the Role Name field (e.g., `odoo`).
    5. Navigate to the Definition tab, enter a secure password (e.g., `odoo`), and click Save.
    6. Go to the Privileges tab and set Can login? to `Yes` and Create database? to `Yes`.

Installing Dependencies

Before proceeding with dependency installation, you must download and install the Build Tools for Visual Studio. During the installation prompt, select C++ build tools in the Workloads tab and proceed with their installation.

The required Odoo dependencies are enumerated in the `requirements.txt` file, which is located at the root of the Odoo community directory.

Tip: It is often advisable to avoid mixing Python module packages between different Odoo instances or with your system\'s global Python environment. Consider using virtualenv to create isolated Python environments for each Odoo installation.

Navigate to the path of your Odoo Community installation (referred to as `CommunityPath`) and run `pip` on the requirements file from a terminal opened with Administrator privileges:

C:\> cd \CommunityPath
C:\> pip install setuptools wheel
C:\> pip install -r requirements.txt

For languages requiring a right-to-left interface (such as Arabic or Hebrew), the `rtlcss` package is also necessary:

  1. Download and install Node.js.
  2. Install `rtlcss` globally using npm:
    C:\> npm install -g rtlcss
  3. Edit the System Environment’s `PATH` variable to include the directory where `rtlcss.cmd` is located (typically: `C:\Users\<user>\AppData\Roaming\npm\`).

Important: As noted earlier, `wkhtmltopdf` is not installed via `pip`. You must manually install version 0.12.5 to ensure it supports headers and footers in your reports. Refer to our wiki for detailed information on different versions.

Running Odoo from Source

Once all prerequisites and dependencies are successfully established, Odoo can be launched by executing `odoo-bin`, which serves as the command-line interface for the server. This executable is located at the root of your Odoo Community directory.

To configure the Odoo server, you have two options: either specify command-line arguments directly or utilize a configuration file.

Tip: For the Enterprise edition, it is crucial to add the path to the `enterprise` add-ons directory to the `addons-path` argument. This path must precede other paths in `addons-path` to ensure the add-ons are loaded correctly.

Commonly required configurations include:

  • PostgreSQL user and password details.
  • Custom add-on paths, in addition to the defaults, to load your own modules effectively.

A typical command to launch the Odoo server would be:

C:\> cd CommunityPath/
C:\> python odoo-bin -r dbuser -w dbpassword --addons-path=addons -d mydb

In this command:

  • `CommunityPath` refers to the directory where your Odoo Community installation resides.
  • `dbuser` is your PostgreSQL login username.
  • `dbpassword` is the corresponding PostgreSQL password.
  • `mydb` is the name of the PostgreSQL database you wish to use.

After the server has successfully started (indicated by the INFO log message `odoo.modules.loading: Modules loaded.`), open your web browser and navigate to http://localhost:8069. You can then log in with the default base administrator account: use `admin` for both the Email and the Password. Congratulations, you have successfully logged into your own Odoo database!

Tip:

  • From within the Odoo web interface, you can create and manage new users.
  • It is important to distinguish between the user account used to log into Odoo’s web interface and the `--db_user` command-line interface argument, which refers to the PostgreSQL database user.

Docker Deployment

For those who prefer containerized deployments, comprehensive documentation on how to utilize Odoo with Docker is available on the official Odoo Docker image page. This resource provides detailed instructions and best practices for setting up Odoo within a Docker environment.

A ishte kjo përgjigje e dobishme? 0 Përdoruesit e Gjetën Këtë të Dobishme (0 Votime)