There are mutliple ways to install Odoo, or not install it at all, depending on the intended use case.
В этом документе рассматривается большинство параметров установки.
- Демонстрационная
- The simplest "installation", only suitable for getting a quick feel for Odoo or trying something out
- SaaS
Trivial to start with and fully managed and migrated by Odoo S.A., can be used to both test Odoo and use it for your business, prevents complex customization (i.e. incompatible with custom modules or the Odoo Apps Store).
Может использоваться как для тестирования Odoo, так и для долгосрочного использования.
- С помощью инсталлятора
Simple to get started, allows more flexibility in hosting and deploying the system and greater control over where data is stored. The maintenance burden is shifted to the user.
Подходит для тестирования Odoo, разработки модулей и может использоваться для долгосрочного использования при необходимости выполнения дополнительных работ по обслуживанию.
- Из исходников
Harder to get started than С помощью инсталлятора, provides even greater flexibility: packaged installers don't generally allow multiple running Odoo versions on the same system, and don't provide easy source access to Odoo itself.
Good for developing modules, can be used as base for production deployment.
The source code can be obtained by downloading a tarball or using git. Using git is strongly advised, as it makes it easier to update, switch between multiple versions (including the current development version) or contribute.
- docker image
- If you usually use docker for development or deployment, an official docker base image is available, see the image's help document for more information.
Версии Odoo
Существуют две версии Editions Odoo: Community и Enterprise. Использование версии Enterprise возможно на нашей SaaS, исходный код доступен корпоративным клиентам и партнерам. Версия Community доступна всем.
Если вы уже используете версию Community и хотите перейти на Enterprise, обратитесь к От Community к Enterprise (кроме Из исходников).
If you wish to access the Enterprise installers/source code, you can:
- Go to the Download page and log in with your customer credentials
- Download the source on GitHub using git_(available to partners only)
Примечание
If you do not have access to our Enterprise repository, you can request it be e-mailing your sales representative or our online support with your subscription number and GitHub username. (available to partners only)
Предупреждение
Enterprise deb and rpm packages do not have repositories, so automatic update will not work. Reinstalling the latest package version will be needed to update manually an installation.
Демонстрационная
Чтобы просто получить краткое представление об Odoo, доступны экземпляры demo. Они представляют собой установки, которые живут в течение нескольких часов, и могут использоваться без каких-либо обязательств.
Для экземпляров Demo не требуется локальная установка, а только веб-браузер.
SaaS
Odoo's SaaS provides private instances and starts out free. It can be used to discover and test Odoo and do non-code customizations without having to install it locally.
Как и экземпляры 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
- Download the installer from our nightly server (Community only) or the Windows installer from the Download page (any edition)
Run the downloaded file
Предупреждение
on Windows 8, you may see a warning titled "Windows protected your PC". Click More Info then Run anyway
- Accept the UAC prompt
- Go through the various installation steps
Odoo будет автоматически запущен в конце установки.
Configuration
The configuration file can be found at
%PROGRAMFILES%\Odoo 9.0-id\server\openerp-server.conf
.
The configuration file can be edited to connect to a remote Postgresql, edit file locations or set a dbfilter.
To reload the configuration file, restart the Odoo service via
.Deb
Community
To install Odoo 9.0 Community on Debian-based distribution, execute the following commands as root:
# wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
# echo "deb http://nightly.odoo.com/9.0/nightly/deb/ ./" >> /etc/apt/sources.list
# apt-get update && apt-get install odoo
You can then use the usual apt-get upgrade
command to keep your installation up-to-date.
Enterprise
For Odoo 9.0 Enterprise, get the package from the Download page. You can then
use gdebi
:
# apt-get install postgresql -y
# gdebi <path_to_installation_package>
Or dpkg
(handles less dependencies automatically):
# apt-get install postgresql -y
# 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 и автоматически запустит сервер.
Опасно
to print PDF reports, you must install wkhtmltopdf yourself: the version of wkhtmltopdf available in debian repositories does not support headers and footers so it can not be installed automatically. The recommended version is 0.12.1 and is available on the wkhtmltopdf download page, in the archive section. As there is no official release for Debian Jessie, you can find ours on the extra section of our nightly server.
Configuration
The configuration file can be found at
/etc/odoo/openerp-server.conf
When the configuration file is edited, Odoo must be restarted using
service
:
$ sudo service odoo restart
Restarting odoo: ok
RPM
Community
Execute the following commands to install Odoo 9.0 Community on your server:
$ sudo yum install -y postgresql-server
$ sudo postgresql-setup initdb
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
$ sudo yum-config-manager --add-repo=https://nightly.odoo.com/9.0/nightly/rpm/odoo.repo
$ sudo yum install -y odoo
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
Enterprise
For Odoo 9.0 Enterprise, get the package from the Download page. Then run:
$ sudo yum install -y postgresql-server
$ sudo postgresql-setup initdb
$ sudo systemctl enable postgresql
$ sudo systemctl start postgresql
$ sudo yum localinstall odoo_9.0.latest.noarch.rpm
$ sudo systemctl enable odoo
$ sudo systemctl start odoo
Опасно
to print PDF reports, you must install wkhtmltopdf yourself: the version of wkhtmltopdf available in Fedora/CentOS repositories does not support headers and footers so it can not be installed automatically. Use the version available on the wkhtmltopdf download page.
Configuration
The configuration file can be found at
/etc/odoo/openerp-server.conf
When the configuration file is edited, Odoo must be restarted via SystemD:
$ sudo systemctl restart odoo
Из исходников
The source "installation" really is 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 more easily keeping (and running) multiple versions of Odoo side-by-side.
Community
There are two way to get the odoo source source zip or git.
- Odoo zip can be downloaded from our nightly server or our Download page, the zip file then needs to be uncompressed to use its content
git allows simpler update and easier switching between different versions of Odoo. It also simplifies maintaining non-module patches and contributions. The primary drawback of git is that it is significantly larger than a tarball as it contains the entire history of the Odoo project.
The git repository is https://github.com/odoo/odoo.git for the Community version.
Downloading it requires a git client (which may be available via your distribution on linux) and can be performed using the following command:
$ git clone https://github.com/odoo/odoo.git
Enterprise
If you have access to the Enterprise repository (see Версии Odoo if you wish to get access), you can use this command to fetch the addons:
$ git clone https://github.com/odoo/enterprise.git
If you use git, you must modify the --addons-path
parameter of your launch command (init.d
, custom script, configuration file,
etc.). The Enterprise addons folder should be included before the default
addons folder.
For example:
$ odoo.py --addons-path=~/src/custom_modules,~/src/enterprise,~/src/odoo/addons
Предупреждение
The Enterprise git repository does not contain the full Odoo source code. You need to clone both the Community and Enterprise repository to have a working Odoo installation. The Download page contains the entire source code but is not updateable as easily.
Installing dependencies
Source installation requires manually installing dependencies:
Python 2.7.
- on Linux and OS X, included by default
on Windows, use the official Python 2.7.9 installer.
Предупреждение
select "add python.exe to Path" during installation, and reboot afterwards to ensure the
PATH
is updatedПримечание
if Python is already installed, make sure it is 2.7.9, previous versions are less convenient and 3.x versions are not compatible with Odoo
PostgreSQL, to use a local database
After installation you will need to create a postgres user: by default the only user is
postgres
, and Odoo forbids connecting aspostgres
.on Linux, use your distribution's package, then create a postgres user named like your login:
$ sudo su - postgres -c "createuser -s $USER"
Because the role login is the same as your unix login unix sockets can be use without a password.
- on OS X, postgres.app is the simplest way to get started, then create a postgres user as on Linux
on Windows, use PostgreSQL for windows then
- add PostgreSQL's
bin
directory (default:C:\Program Files\PostgreSQL\9.4\bin
) to yourPATH
create a postgres user with a password using the pg admin gui: open pgAdminIII, double-click the server to create a connection, select Role Name field (e.g.
, enter the usename in theodoo
), then open the Definition tab and enter the password (e.g.odoo
), then click OK.The user and password must be passed to Odoo using either the
-w
and-r
options or the configuration file
- add PostgreSQL's
Python dependencies listed in the
requirements.txt
file.on Linux, python dependencies may be installable with the system's package manager or using pip.
For libraries using native code (Pillow, lxml, greenlet, gevent, psycopg2, ldap) it may be necessary to install development tools and native dependencies before pip is able to install the dependencies themselves. These are available in
-dev
or-devel
packages for Python, Postgres, libxml2, libxslt, libevent, libsasl2 and libldap2. Then the Python dependecies can themselves be installed:$ pip install -r requirements.txt
on OS X, you will need to install the Command Line Tools (
xcode-select --install
) then download and install a package manager of your choice (homebrew, macports) to install non-Python dependencies. pip can then be used to install the Python dependencies as on Linux:$ pip install -r requirements.txt
on Windows you need to install some of the dependencies manually, tweak the requirements.txt file, then run pip to install the remaning ones.
Install
psycopg
using the installer here http://www.stickpeople.com/projects/python/win-psycopg/Then edit the requirements.txt file:
- remove
psycopg2
as you already have it. - remove the optional
python-ldap
,gevent
andpsutil
because they require compilation. - add
pypiwin32
because it's needed under windows.
Then use pip to install the dependencies using the following command from a cmd.exe prompt (replace
\YourOdooPath
by the actual path where you downloaded Odoo):C:\> cd \YourOdooPath C:\YourOdooPath> C:\Python27\Scripts\pip.exe install -r requirements.txt
- remove
Less CSS via nodejs
on Linux, use your distribution's package manager to install nodejs and npm.
Предупреждение
In debian wheezy and Ubuntu 13.10 and before you need to install nodejs manually:
$ wget -qO- https://deb.nodesource.com/setup | bash - $ apt-get install -y nodejs
In later debian (>jessie) and ubuntu (>14.04) you may need to add a symlink as npm packages call
node
but debian calls the binarynodejs
$ apt-get install -y npm $ sudo ln -s /usr/bin/nodejs /usr/bin/node
Once npm is installed, use it to install less:
$ sudo npm install -g less
on OS X, install nodejs via your preferred package manager (homebrew, macports) then install less:
$ sudo npm install -g less
on Windows, install nodejs, reboot (to update the
PATH
) and install less:C:\> npm install -g less
Запуск Odoo
Once all dependencies are set up, Odoo can be launched by running odoo.py
.
Предупреждение
For the Enterprise edition, you must specify the enterprise
addons folder when starting your server. You can do so by providing the path
to your enterprise
folder in the addons-path
parameter. Please
note that the enterprise
folder must come before the default
addons
folder in the list for the addons to be loaded correctly.
Configuration can be provided either through command-line arguments or through a configuration file.
Общие необходимые настройки:
PostgreSQL host, port, user and password.
Odoo has no defaults beyond psycopg2's defaults: connects over a UNIX socket on port 5432 with the current user and no password. By default this should work on Linux and OS X, but it will not work on windows as it does not support UNIX sockets.
- Custom addons path beyond the defaults, to load your own modules
Under Windows a typical way to execute odoo would be:
C:\YourOdooPath> python odoo.py -w odoo -r odoo --addons-path=addons,../mymodules --db-filter=mydb$
Where odoo
, odoo
are the postgresql login and password,
../mymodules
a directory with additional addons and mydb
the default
db to serve on localhost:8069
Under Unix a typical way to execute odoo would be:
$ ./odoo.py --addons-path=addons,../mymodules --db-filter=mydb$
Where ../mymodules
is a directory with additional addons and mydb
the
default db to serve on localhost:8069