Odoo 19 安裝教學|最簡單實用的 Odoo 19 部署指南(Ubuntu/Debian)

提供一份基於官方文檔的 Odoo 19 安裝教程,涵蓋環境準備、PostgreSQL 安裝、添加倉庫、安裝 Odoo、服務配置及啟動步驟。適用於 Ubuntu、Debian 等主流 Linux 系統,簡單實用,新手也能輕鬆完成部署。

1. Preparation

  1. Log in to your server (it is recommended to use a stable version of Ubuntu or Debian).
  2. Ensure you have a user with sudo privileges.
  3. Update system:
    sudo apt update && sudo apt upgrade -y
    
  4. Install PostgreSQL (database service is required for Odoo). For example, on Debian/Ubuntu:
    sudo apt install postgresql -y
    ```  
    
  5. Confirm that the PostgreSQL service is enabled and running.

​Tip: In a production environment, it is recommended to use SSD storage, at least 20 GB (for testing) or more (for production), and ensure sufficient server resources (CPU, memory).

2. Add Odoo Repository & Install Odoo Package

  1. Import Odoo's repository key and add the Odoo repository to the system:
    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/19.0/nightly/deb/ ./" | sudo tee /etc/apt/sources.list.d/odoo.list
    sudo apt update
    ```  
    
  2. Install Odoo:
    sudo apt install odoo
    
    This will install the Odoo Community version. If you have the Enterprise version, you need to download the Enterprise package through an authorized account. 

3. Initial Configuration

  1. Install wkhtmltopdf (used for generating PDF reports with header and footer support) Note: A specific version (e.g., 0.12.6) must be installed to ensure proper functionality.
  2. Configure PostgreSQL: Ensure Odoo can connect to the database. If PostgreSQL is on the same host as Odoo, the default "localhost" is sufficient. For distributed deployment, you need to modify PostgreSQL's listening configuration and firewall rules. 
  3. Edit the Odoo configuration file (such as /etc/odoo/odoo.conf or /etc/odoo.conf, depending on the installation package) for basic settings. For example, specify the user, log path, addons path, etc.
  4. Start Odoo service and set it to auto-start on boot:
    sudo systemctl start odoo
    sudo systemctl enable odoo
    
  5. Access the browser and enter: http://your_server_IP:8069 (default port 8069) to enter Odoo.

4. Production Environment Recommendations (Optional but Strongly Recommended)

  • Set up a reverse proxy (such as Nginx) and configure HTTPS (with certificates like Let’s Encrypt).
  • Set dbfilter in the configuration file to control multi-database environments and enhance security.
  • Prohibit database list page access (--no-database-list parameter) to enhance security.
  • Regularly back up the PostgreSQL database and Odoo files.
  • Restrict open ports on the firewall (typically only 8069, 80/443, and database ports when necessary) and monitor logs.

5. Quick Summary

  • Installation process: Prepare → Install PostgreSQL → Add Odoo repository → Install Odoo package → Configure and start the service.
  • Notes: wkhtmltopdf version, PostgreSQL configuration, security settings (dbfilter, reverse proxy, HTTPS) are key.
  • The official documentation clearly states that the packaging method is suitable for most users, in situations where source code development or high customization is not pursued.

关于我们

​我们致力于帮助中小企业实现数字化转型,我们的团队由一群充满激情和创新思维的专业人士组成,他们具备丰富的行业经验和技术专长。

扫一扫获取顾问以及手册

归档
登入 發表評論
Odoo PostgreSQL分庫分表性能優化方向方案
本方案由乙方技術團隊編製,針對 Odoo18 系統 PostgreSQL 資料庫容量增長(4.5TB)導致的效能問題,提出以「分庫分表、分區優化、歸檔冷資料、索引與儲存調優」為核心的資料庫優化架構方案。目標是在未來三年內實現系統查詢效能提升 40% 以上、主庫容量控制在 500GB 以內、備份與維護週期縮短 60%。