User Tools

Site Tools


odoo_unter_bullseye_installieren

Odoo unter Bullseye installieren

Voraussetzungen

Server Grundinstallation mit Debian 11 Bullseye. Danach auf aktuellen Stand bringen mit:

apt update && apt upgrade

Installation von PostgreSQL, wkhtmltopdf, fish und Nginx

apt install postgresql wkhtmltopdf fish nginx

fish als Standardshell für root festlegen

chsh --shell $(which fish)

Am besten jetzt rebooten, dann ist danach fish aktiv, und falls beim update Kerneländerungen dabei waren, sind die auch gleich aktiv.

shutdown -r now

Odoo über Paketquellen installieren

Paketquellen zufügen incl. Key und Installation

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

Nginx als Proxy einrichten und Letsencrypt Zertifikate erstellen

In /etc/nginx/sites-available/ die Datei odoo anlegen:

# Odoo Upstreams
upstream odooserver {
 server 127.0.0.1:8069;
}

server {
    listen  80;
    listen [::]:80;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name wawi.freibier.cc erp.freibier.cc erpel.freibier.cc;
    ssl_certificate /etc/letsencrypt/live/wawi.freibier.cc/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/wawi.freibier.cc/privkey.pem;

    ssl_protocols TLSv1.2;
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-PO
LY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
    ssl_prefer_server_ciphers off;

    if ($ssl_protocol = "") {
            return 301 https://$server_name$request_uri;
    }


    access_log /var/log/nginx/odoo_access.log;
    error_log /var/log/nginx/odoo_error.log;


    # Proxy settings
    proxy_read_timeout 720s;
    proxy_connect_timeout 720s;
    proxy_send_timeout 720s;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;

    # Request for root domain
    location / {
       proxy_redirect off;
       proxy_pass http://odooserver;
    }

    # Cache static files
    location ~* /web/static/ {
        proxy_cache_valid 200 90m;
        proxy_buffering on;
        expires 864000;
        proxy_pass http://odooserver;
    }

    # Gzip
    gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
    gzip on;
}

Default Nginx Konfiguration löschen und die Datei odoo nach /etc/nginx/sites-enabled/ verlinken.

cd /etc/nginx/sites-enabled/
rm default 
ln -s ../sites-available/odoo

Nginx stoppen zum Zertifikate erstellen

systemctl stop nginx.service

Certbot installieren, oben vergessen, deshalb hier separat. Da es eine 1 zu 1 Doku wird. Bei der nächsten VErsion oben bei der Installation der restlichen Pakete hinzufügen

apt install certbot

Zertifikat für sämtliche Subdomains erstellen

certbot certonly -d wawi.freibier.cc -d erp.freibier.cc -d erpel.freibier.cc

Nginx starten.

systemctl start nginx.service

Verwendete Quellen:

https://computingforgeeks.com/how-to-install-odoo-on-debian-linux/
https://wiki.ubuntuusers.de/Howto/Odoo_Installation/

odoo_unter_bullseye_installieren.txt · Last modified: 2022/10/11 12:17 by admin

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki