Установка

There are multiple ways to install Odoo, or not install it at all, depending on the intended use case.

В этом документе рассматривается большинство параметров установки.

Online
Это самый простой способ использовать Odoo. Лучше всего подходит для первого ознакомления с системой
С помощью инсталлятора
Подходит для тестирования Odoo, разработки модулей и может использоваться для долгосрочного использования при необходимости выполнения дополнительных работ по обслуживанию.
Из исходников
Обеспечивает большую гибкость: например, можно запустить несколько версий Odoo в одной системе. Хорошо подходит и для разработки модулей, и для продакшн.
Docker
Если вы обычно используете docker для разработки или развертывания, доступен официальный образ docker.

Версии Odoo

Существуют две версии Editions Odoo: Community и Enterprise. Использование версии Enterprise возможно на нашей SaaS, исходный код доступен корпоративным клиентам и партнерам. Версия Community доступна всем.

Если вы уже используете версию Community и хотите перейти на Enterprise, обратитесь к От Community к Enterprise (кроме Из исходников).

Online

Демонстрационная

Чтобы просто получить краткое представление об Odoo, доступны экземпляры demo. Они представляют собой установки, которые живут в течение нескольких часов, и могут использоваться без каких-либо обязательств.

Для экземпляров Demo не требуется локальная установка, а только веб-браузер.

SaaS

Самый простой способ начать, полностью управляемый и перенесенный с помощью Odoo S.A.,Odoo SaaS предоставляет частный доступ и запускается бесплатно. Его можно использовать для тестирования Odoo и выполнения настроек без кода, без необходимости устанавливать Odoo локально.

Может использоваться как для тестирования Odoo, так и для долгосрочного использования.

Как и экземпляры demo, экземпляры SaaS не требуют локальной установки, достаточно веб-браузера.

С помощью инсталлятора

Odoo предоставляет упакованные инсталляторы для Windows, deb-дистрибутивы (Debian, Ubuntu, …) и RPM-дистрибутивы (Fedora, CentOS, RHEL, …) для версий Community и Enterprise.

Эти пакеты автоматически настраивают все зависимости, но могут возникнуть сложности при обновлении.

Official Community packages with all relevant dependency requirements are available on our nightly server. Both Communtiy and Enterprise packages can be downloaded from our download page (you must to be logged in as a paying customer or partner to download the Enterprise packages).

Windows

  1. Download the installer from our nightly server (Community only) or the Windows installer from the download page (any edition).
  2. Execute the downloaded file.

  3. Accept the UAC prompt.
  4. Go through the various installation steps.

Odoo будет автоматически запущен в конце установки.

Linux

Debian/Ubuntu

Odoo 13.0 „deb“ package currently supports Debian Buster, Ubuntu 18.04 or above.

Подготовка

Odoo needs a PostgreSQL server to run properly. The default configuration for the Odoo „deb“ package is to use the PostgreSQL server on the same host as your Odoo instance. Execute the following command in order to install the PostgreSQL server:

$ sudo apt install postgresql -y
Репозиторий

Odoo S.A. provides a repository that can be used with Debian and Ubuntu distributions. It can be used to install Odoo Community Edition by executing the following commands as root:

# wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
# echo "deb http://nightly.odoo.com/13.0/nightly/deb/ ./" >> /etc/apt/sources.list.d/odoo.list
# apt-get update && apt-get install odoo

You can then use the usual [UNKNOWN NODE title_reference] command to keep your installation up-to-date.

At this moment, there is no nightly repository for the Enterprise Edition.

Deb пакеты

Instead of using the repository as described above, the „deb“ packages for both the Community and Enterprise editions can be downloaded from the official download page.

Next, execute the following commands as root:

# 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>

Это установит Odoo в качестве службы, создаст нужного пользователя PostgreSQL и автоматически запустит сервер.

Fedora

Odoo 13.0 „rpm“ package supports Fedora 30.

Подготовка

Odoo needs a PostgreSQL server to run properly. Make sure that the [UNKNOWN NODE title_reference] command is available and well configured and, only then, execute the following command in order to install the PostgreSQL server:

$ sudo dnf install -y postgresql-server
$ sudo postgresql-setup --initdb --unit postgresql
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
Репозиторий

Odoo S.A. provides a repository that can be used with the Fedora distributions. It can be used to install Odoo Community Edition by executing the following commands:

$ sudo dnf config-manager --add-repo=https://nightly.odoo.com/13.0/nightly/rpm/odoo.repo
$ sudo dnf install -y odoo
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
RPM пакеты

Instead of using the repository as described above, the „rpm“ packages for both the Community and Enterprise editions can be downloaded from the official download page.

После загрузки, пакет может быть установлен с помощью пакетного менеджера [UNKNOWN NODE title_reference]:

$ sudo dnf localinstall odoo_13.0.latest.noarch.rpm
$ sudo systemctl enable odoo
$ sudo systemctl start odoo

Из исходников

The source «installation» is really about not installing Odoo, and running it directly from source instead.

Это может быть более удобным для разработчиков модулей, поскольку исходники Odoo будут расположены так, как вам нужно. Это может быть удобнее чем использование пакетной установки (для изучения исходного кода модулей или для сборки этой документации и ее доступности в автономном режиме).

запуск и остановка работы Odoo становятся более гибким и очевидными, чем службы, настроенные упакованными установками, и позволяет переопределять параметры, используя параметры командной строки без необходимости редактировать файл конфигурации.

Finally it provides greater control over the system’s set up, and allows to more easily keep (and run) multiple versions of Odoo side-by-side.

Windows

Установка из исходников

There are two ways to obtain the source code of Odoo: as a zip archive or through git.

Archive

Community Edition:

Enterprise Edition:

Git

The following requires git to be installed on your machine and that you have basic knowledge of git commands.

Community Edition:

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

Enterprise Edition: (see Версии Odoo to get access)

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

Подготовка

Python

Odoo requires Python 3.6 or later to run. Visit Python’s download page to download and install the latest version of Python 3 on your machine.

During installation, check Add Python 3 to PATH, then click Customize Installation and make sure that pip is checked.

PostgreSQL

Odoo uses PostgreSQL as database management system. Download and install the latest version of PostgreSQL.

By default, the only user is [UNKNOWN NODE title_reference] but Odoo forbids connecting as [UNKNOWN NODE title_reference], so you need to create a new PostgreSQL user:

  1. Add PostgreSQL’s [UNKNOWN NODE title_reference] directory (by default: [UNKNOWN NODE title_reference]) to your [UNKNOWN NODE title_reference].
  2. Create a postgres user with a password using the pg admin gui:

    1. Open pgAdmin.
    2. Double-click the server to create a connection.
    3. Select Object ‣ Create ‣ Login/Group Role.
    4. Enter the username in the Role Name field (e.g. [UNKNOWN NODE title_reference]).
    5. Open the Definition tab and enter the password (e.g. odoo), then click Save.
    6. Open the Privileges tab and switch Can login? to [UNKNOWN NODE title_reference] and Create database? to [UNKNOWN NODE title_reference].
Зависимости

Before installing the dependencies, you must download and install the Build Tools for Visual Studio. When prompted, select C++ build tools in the Workloads tab and install them.

Odoo dependencies are listed in the [UNKNOWN NODE title_reference] file located at the root of the Odoo community directory.

Navigate to the path of your Odoo Community installation ([UNKNOWN NODE title_reference]) and run pip on the requirements file in a terminal with Administrator privileges:

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

For languages with right-to-left interface (such as Arabic or Hebrew), the package [UNKNOWN NODE title_reference] is needed:

  1. Download and install nodejs.
  2. Install [UNKNOWN NODE title_reference]:

    C:\> npm install -g rtlcss
    
  3. Edit the System Environment’s variable [UNKNOWN NODE title_reference] to add the folder where [UNKNOWN NODE title_reference] is located (typically: [UNKNOWN NODE title_reference]).

Запуск Odoo

Once all dependencies are set up, Odoo can be launched by running [UNKNOWN NODE title_reference], the command-line interface of the server. It is located at the root of the Odoo Community directory.

Конфигурация может быть предоставлена или через аргументы командной строки или через файл конфигурации.

Общие необходимые настройки:

  • PostgreSQL user and password.
  • Custom addon paths beyond the defaults, to load your own modules.

A typical way to run the server would be:

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

Where [UNKNOWN NODE title_reference] is the path of the Odoo Community installation, [UNKNOWN NODE title_reference] is the PostgreSQL login, [UNKNOWN NODE title_reference] is the PostgreSQL password and [UNKNOWN NODE title_reference] is the default database to serve on [UNKNOWN NODE title_reference]. You can add other directory paths separated by a comma to addons at the end of the addons-path option.

Linux

Установка из исходников

There are two ways to obtain the source code of Odoo: as a zip archive or through git.

Archive

Community Edition:

Enterprise Edition:

Git

The following requires git to be installed on your machine and that you have basic knowledge of git commands.

Community Edition:

$ git clone https://github.com/odoo/odoo.git

Enterprise Edition: (see Версии Odoo to get access)

$ git clone https://github.com/odoo/enterprise.git

Подготовка

Python

Odoo requires Python 3.6 or later to run. Use your package manager to download and install Python 3 on your machine if it is not already done.

PostgreSQL

Odoo uses PostgreSQL as database management system. Use your package manager to download and install the latest version of PostgreSQL.

On Debian/Unbuntu, it can be achieved by executing the following:

$ sudo apt install postgresql postgresql-client

By default, the only user is [UNKNOWN NODE title_reference] but Odoo forbids connecting as [UNKNOWN NODE title_reference], so you need to create a new PostgreSQL user:

$ sudo -u postgres createuser -s $USER
$ createdb $USER
Зависимости

For libraries using native code, it is necessary to install development tools and native dependencies before the Python dependencies of Odoo. They are available in [UNKNOWN NODE title_reference] or [UNKNOWN NODE title_reference] packages for Python, PostgreSQL, libxml2, libxslt1, libevent, libsasl2 and libldap2.

On Debian/Unbuntu, the following command should install all the required libraries:

$ sudo apt install python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev

Odoo dependencies are listed in the [UNKNOWN NODE title_reference] file located at the root of the Odoo community directory.

Navigate to the path of your Odoo Community installation ([UNKNOWN NODE title_reference]) and run pip on the requirements file:

$ cd /CommunityPath
$ pip3 install setuptools wheel
$ pip3 install -r requirements.txt

For languages with right-to-left interface (such as Arabic or Hebrew), the package [UNKNOWN NODE title_reference] is needed:

  1. Download and install nodejs and npm with your package manager.
  2. Install [UNKNOWN NODE title_reference]:

    $ sudo npm install -g rtlcss
    

Запуск Odoo

Once all dependencies are set up, Odoo can be launched by running [UNKNOWN NODE title_reference], the command-line interface of the server. It is located at the root of the Odoo Community directory.

Конфигурация может быть предоставлена или через аргументы командной строки или через файл конфигурации.

Общие необходимые настройки:

  • PostgreSQL user and password. Odoo has no defaults beyond psycopg2’s defaults: connects over a UNIX socket on port [UNKNOWN NODE title_reference] with the current user and no password.
  • Custom addon paths beyond the defaults, to load your own modules.

A typical way to run the server would be:

$ cd /CommunityPath
$ python3 odoo-bin --addons-path=addons -d mydb

Where [UNKNOWN NODE title_reference] is the path of the Odoo Community installation and [UNKNOWN NODE title_reference] is the default database to serve on [UNKNOWN NODE title_reference]. You can add other directory paths separated by a comma to addons at the end of the addons-path option.

Mac OS

Установка из исходников

There are two ways to obtain the source code of Odoo: as a zip archive or through git.

Archive

Community Edition:

Enterprise Edition:

Git

The following requires git to be installed on your machine and that you have basic knowledge of git commands.

Community Edition:

$ git clone https://github.com/odoo/odoo.git

Enterprise Edition: (see Версии Odoo to get access)

$ git clone https://github.com/odoo/enterprise.git

Подготовка

Python

Odoo requires Python 3.6 or later to run. Use your preferred package manager (homebrew, macports) to download and install Python 3 on your machine if it is not already done.

PostgreSQL

Odoo uses PostgreSQL as database management system. Use postgres.app to download and install the latest version of PostgreSQL.

By default, the only user is [UNKNOWN NODE title_reference] but Odoo forbids connecting as [UNKNOWN NODE title_reference], so you need to create a new PostgreSQL user:

$ sudo -u postgres createuser -s $USER
$ createdb $USER
Зависимости

Odoo dependencies are listed in the [UNKNOWN NODE title_reference] file located at the root of the Odoo community directory.

Navigate to the path of your Odoo Community installation ([UNKNOWN NODE title_reference]) and run pip on the requirements file:

$ cd /CommunityPath
$ pip3 install setuptools wheel
$ pip3 install -r requirements.txt

For languages with right-to-left interface (such as Arabic or Hebrew), the package [UNKNOWN NODE title_reference] is needed:

  1. Download and install nodejs with your preferred package manager (homebrew, macports).
  2. Install [UNKNOWN NODE title_reference]:

    $ sudo npm install -g rtlcss
    

Запуск Odoo

Once all dependencies are set up, Odoo can be launched by running [UNKNOWN NODE title_reference], the command-line interface of the server. It is located at the root of the Odoo Community directory.

Конфигурация может быть предоставлена или через аргументы командной строки или через файл конфигурации.

Общие необходимые настройки:

  • PostgreSQL user and password. Odoo has no defaults beyond psycopg2’s defaults: connects over a UNIX socket on port [UNKNOWN NODE title_reference] with the current user and no password.
  • Custom addon paths beyond the defaults, to load your own modules.

A typical way to run the server would be:

$ cd /CommunityPath
$ python3 odoo-bin --addons-path=addons -d mydb

Where [UNKNOWN NODE title_reference] is the path of the Odoo Community installation and [UNKNOWN NODE title_reference] is the default database to serve on [UNKNOWN NODE title_reference]. You can add other directory paths separated by a comma to addons at the end of the addons-path option.

Docker

The full documentation on how to use Odoo with Docker can be found on the official Odoo docker image page.