odoo源码安装

2024-06-24 03:20
文章标签 源码 安装 odoo

本文主要是介绍odoo源码安装,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

The source ‘installation’ is not about installing Odoo but running it directly from the source instead.

Using the Odoo source can be more convenient for module developers as it is more easily accessible than using packaged installers.

It makes starting and stopping Odoo more flexible and explicit than the services set up by the packaged installers. Also, it allows overriding settings using command-line parameters without needing to edit a configuration file.

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

Fetch the sources

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

Archive

Community edition:

  • Odoo download page

  • GitHub Community repository

  • Nightly server

Enterprise edition:

  • Odoo download page

  • GitHub Enterprise repository

Git

 Note

It is required to have Git installed, and it is recommended to have a basic knowledge of Git commands to proceed.

To clone a Git repository, choose between cloning with HTTPS or SSH. In most cases, the best option is HTTPS. However, choose SSH to contribute to Odoo source code or when following the Getting Started developer tutorial.

LinuxWindowsMac OS

Clone with HTTPSClone with SSH

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

 Note

The Enterprise git repository does not contain the full Odoo source code. It is only a collection of extra add-ons. The main server code is in the Community edition. Running the Enterprise version means running the server from the Community version with the addons-path option set to the folder with the Enterprise edition. It is required to clone both the Community and Enterprise repositories to have a working Odoo Enterprise installation.

Prepare

Python

Odoo requires Python 3.10 or later to run.

Changed in version 17: Minimum requirement updated from Python 3.7 to Python 3.10.

LinuxWindowsMac OS

Use a package manager to download and install Python 3 if needed.

 Note

If Python 3 is already installed, make sure that the version is 3.10 or above, as previous versions are not compatible with Odoo.

LinuxWindowsMac OS

$ python3 --version

Verify that pip is also installed for this version.

LinuxWindowsMac OS

$ pip3 --version

PostgreSQL

Odoo uses PostgreSQL as its database management system.

LinuxWindowsMac OS

Use a package manager to download and install PostgreSQL (supported versions: 12.0 or above). It can be achieved by executing the following:

$ sudo apt install postgresql postgresql-client

By default, the only user is postgres. As Odoo forbids connecting as postgres, create a new PostgreSQL user.

LinuxWindowsMac OS

$ sudo -u postgres createuser -d -R -S $USER
$ createdb $USER

 Note

Because the PostgreSQL user has the same name as the Unix login, it is possible to connect to the database without a password.

Dependencies

LinuxWindowsMac OS

Using distribution packages is the preferred way of installing dependencies. Alternatively, install the Python dependencies with pip.

Debian/UbuntuInstall with pip

On Debian/Ubuntu, the following commands should install the required packages:

$ cd odoo #CommunityPath
$ sudo ./setup/debinstall.sh

The setup/debinstall.sh script will parse the debian/control file and install the found packages.

 Note

For languages using a right-to-left interface (such as Arabic or Hebrew), the rtlcss package is required.

LinuxWindowsMac OS

  1. Download and install nodejs and npm with a package manager.

  2. Install rtlcss:

    $ sudo npm install -g rtlcss
    

 Warning

wkhtmltopdf is not installed through pip and must be installed manually in version 0.12.6 for it to support headers and footers. Check out the wkhtmltopdf wiki for more details on the various versions.

Running Odoo

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

To configure the server, either specify command-line arguments or a configuration file.

 Tip

For the Enterprise edition, add the path to the enterprise add-ons to the addons-path argument. Note that it must come before the other paths in addons-path for add-ons to be loaded correctly.

Common necessary configurations are:

  • PostgreSQL user and password.

  • Custom addon paths beyond the defaults to load custom modules.

A typical way to run the server would be:

LinuxWindowsMac OS

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

Where CommunityPath is the path of the Odoo Community installation, and mydb is the name of the PostgreSQL database.

After the server has started (the INFO log odoo.modules.loading: Modules loaded. is printed), open http://localhost:8069 in a web browser and log into the Odoo database with the base administrator account: use admin as the email and, again, admin as the password.

 Tip

  • From there, create and manage new users.

  • The user account used to log into Odoo’s web interface differs from the --db_user CLI argument.

 See also

The list of CLI arguments for odoo-bin

这篇关于odoo源码安装的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1089039

相关文章

gitlab安装及邮箱配置和常用使用方式

《gitlab安装及邮箱配置和常用使用方式》:本文主要介绍gitlab安装及邮箱配置和常用使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录1.安装GitLab2.配置GitLab邮件服务3.GitLab的账号注册邮箱验证及其分组4.gitlab分支和标签的

MySQL MCP 服务器安装配置最佳实践

《MySQLMCP服务器安装配置最佳实践》本文介绍MySQLMCP服务器的安装配置方法,本文结合实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下... 目录mysql MCP 服务器安装配置指南简介功能特点安装方法数据库配置使用MCP Inspector进行调试开发指

在Windows上使用qemu安装ubuntu24.04服务器的详细指南

《在Windows上使用qemu安装ubuntu24.04服务器的详细指南》本文介绍了在Windows上使用QEMU安装Ubuntu24.04的全流程:安装QEMU、准备ISO镜像、创建虚拟磁盘、配置... 目录1. 安装QEMU环境2. 准备Ubuntu 24.04镜像3. 启动QEMU安装Ubuntu4

Python UV安装、升级、卸载详细步骤记录

《PythonUV安装、升级、卸载详细步骤记录》:本文主要介绍PythonUV安装、升级、卸载的详细步骤,uv是Astral推出的下一代Python包与项目管理器,主打单一可执行文件、极致性能... 目录安装检查升级设置自动补全卸载UV 命令总结 官方文档详见:https://docs.astral.sh/

Nexus安装和启动的实现教程

《Nexus安装和启动的实现教程》:本文主要介绍Nexus安装和启动的实现教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一、Nexus下载二、Nexus安装和启动三、关闭Nexus总结一、Nexus下载官方下载链接:DownloadWindows系统根

Java SWT库详解与安装指南(最新推荐)

《JavaSWT库详解与安装指南(最新推荐)》:本文主要介绍JavaSWT库详解与安装指南,在本章中,我们介绍了如何下载、安装SWTJAR包,并详述了在Eclipse以及命令行环境中配置Java... 目录1. Java SWT类库概述2. SWT与AWT和Swing的区别2.1 历史背景与设计理念2.1.

安装centos8设置基础软件仓库时出错的解决方案

《安装centos8设置基础软件仓库时出错的解决方案》:本文主要介绍安装centos8设置基础软件仓库时出错的解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐... 目录安装Centos8设置基础软件仓库时出错版本 8版本 8.2.200android4版本 javas

Pytorch介绍与安装过程

《Pytorch介绍与安装过程》PyTorch因其直观的设计、卓越的灵活性以及强大的动态计算图功能,迅速在学术界和工业界获得了广泛认可,成为当前深度学习研究和开发的主流工具之一,本文给大家介绍Pyto... 目录1、Pytorch介绍1.1、核心理念1.2、核心组件与功能1.3、适用场景与优势总结1.4、优

conda安装GPU版pytorch默认却是cpu版本

《conda安装GPU版pytorch默认却是cpu版本》本文主要介绍了遇到Conda安装PyTorchGPU版本却默认安装CPU的问题,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的... 目录一、问题描述二、网上解决方案罗列【此节为反面方案罗列!!!】三、发现的根本原因[独家]3.1 p

windows系统上如何进行maven安装和配置方式

《windows系统上如何进行maven安装和配置方式》:本文主要介绍windows系统上如何进行maven安装和配置方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不... 目录1. Maven 简介2. maven的下载与安装2.1 下载 Maven2.2 Maven安装2.