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

相关文章

Go中sync.Once源码的深度讲解

《Go中sync.Once源码的深度讲解》sync.Once是Go语言标准库中的一个同步原语,用于确保某个操作只执行一次,本文将从源码出发为大家详细介绍一下sync.Once的具体使用,x希望对大家有... 目录概念简单示例源码解读总结概念sync.Once是Go语言标准库中的一个同步原语,用于确保某个操

python管理工具之conda安装部署及使用详解

《python管理工具之conda安装部署及使用详解》这篇文章详细介绍了如何安装和使用conda来管理Python环境,它涵盖了从安装部署、镜像源配置到具体的conda使用方法,包括创建、激活、安装包... 目录pytpshheraerUhon管理工具:conda部署+使用一、安装部署1、 下载2、 安装3

龙蜥操作系统Anolis OS-23.x安装配置图解教程(保姆级)

《龙蜥操作系统AnolisOS-23.x安装配置图解教程(保姆级)》:本文主要介绍了安装和配置AnolisOS23.2系统,包括分区、软件选择、设置root密码、网络配置、主机名设置和禁用SELinux的步骤,详细内容请阅读本文,希望能对你有所帮助... ‌AnolisOS‌是由阿里云推出的开源操作系统,旨

Ubuntu系统怎么安装Warp? 新一代AI 终端神器安装使用方法

《Ubuntu系统怎么安装Warp?新一代AI终端神器安装使用方法》Warp是一款使用Rust开发的现代化AI终端工具,该怎么再Ubuntu系统中安装使用呢?下面我们就来看看详细教程... Warp Terminal 是一款使用 Rust 开发的现代化「AI 终端」工具。最初它只支持 MACOS,但在 20

mysql-8.0.30压缩包版安装和配置MySQL环境过程

《mysql-8.0.30压缩包版安装和配置MySQL环境过程》该文章介绍了如何在Windows系统中下载、安装和配置MySQL数据库,包括下载地址、解压文件、创建和配置my.ini文件、设置环境变量... 目录压缩包安装配置下载配置环境变量下载和初始化总结压缩包安装配置下载下载地址:https://d

LinuxMint怎么安装? Linux Mint22下载安装图文教程

《LinuxMint怎么安装?LinuxMint22下载安装图文教程》LinuxMint22发布以后,有很多新功能,很多朋友想要下载并安装,该怎么操作呢?下面我们就来看看详细安装指南... linux Mint 是一款基于 Ubuntu 的流行发行版,凭借其现代、精致、易于使用的特性,深受小伙伴们所喜爱。对

Linux(Centos7)安装Mysql/Redis/MinIO方式

《Linux(Centos7)安装Mysql/Redis/MinIO方式》文章总结:介绍了如何安装MySQL和Redis,以及如何配置它们为开机自启,还详细讲解了如何安装MinIO,包括配置Syste... 目录安装mysql安装Redis安装MinIO总结安装Mysql安装Redis搜索Red

python安装完成后可以进行的后续步骤和注意事项小结

《python安装完成后可以进行的后续步骤和注意事项小结》本文详细介绍了安装Python3后的后续步骤,包括验证安装、配置环境、安装包、创建和运行脚本,以及使用虚拟环境,还强调了注意事项,如系统更新、... 目录验证安装配置环境(可选)安装python包创建和运行Python脚本虚拟环境(可选)注意事项安装

gradle安装和环境配置全过程

《gradle安装和环境配置全过程》本文介绍了如何安装和配置Gradle环境,包括下载Gradle、配置环境变量、测试Gradle以及在IntelliJIDEA中配置Gradle... 目录gradle安装和环境配置1 下载GRADLE2 环境变量配置3 测试gradle4 设置gradle初始化文件5 i

Jsoncpp的安装与使用方式

《Jsoncpp的安装与使用方式》JsonCpp是一个用于解析和生成JSON数据的C++库,它支持解析JSON文件或字符串到C++对象,以及将C++对象序列化回JSON格式,安装JsonCpp可以通过... 目录安装jsoncppJsoncpp的使用Value类构造函数检测保存的数据类型提取数据对json数