ronny@odoo17:~$ sudo apt-get install fail2ban
ronny@odoo17:~$ sudo apt-get install -y python3-pip
ronny@odoo17:~$ sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmariadb-dev libmariadb-dev-compat libjpeg-dev libpq-dev libjpeg62-turbo-dev liblcms2-dev libblas-dev libatlas-base-dev
ronny@odoo17:~$ sudo apt-get install -y npm
ronny@odoo17:~$ sudo ln -s /usr/bin/nodejs /usr/bin/node
ronny@odoo17:~$ sudo npm install -g less less-plugin-clean-css
ronny@odoo17:~$ sudo apt-get install -y node-less
ronny@odoo17:~$ sudo apt-get install postgresql
ronny@odoo17:~$ sudo su - postgres
postgres@odoo17:~$ createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo17
Enter password for new role:
Enter it again:
postgres@odoo17:~$ psql
psql (13.15 (Debian 13.15-0+deb11u1))
Type "help" for help.
postgres=# ALTER USER odoo17 WITH SUPERUSER;
ALTER ROLE
postgres=#
postgres=# \q
postgres@odoo17:~$ exit
logout
ronny@odoo17:~$
ronny@odoo17:~$ sudo adduser --system --home=/opt/odoo17 --group odoo17
ronny@odoo17:~$ sudo apt-get install git
ronny@odoo17:~$ sudo su - odoo17 -s /bin/bash
odoo17@odoo17:~$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 17.0 --single-branch .
Cloning into '.'...
warning: redirecting to https://github.com/odoo/odoo.git/
remote: Enumerating objects: 40357, done.
remote: Counting objects: 100% (40357/40357), done.
remote: Compressing objects: 100% (31610/31610), done.
remote: Total 40357 (delta 10499), reused 26580 (delta 7345), pack-reused 0
Receiving objects: 100% (40357/40357), 162.15 MiB | 4.14 MiB/s, done.
Resolving deltas: 100% (10499/10499), done.
Updating files: 100% (34823/34823), done.
odoo17@odoo17:~$ exit
ronny@odoo17:~$ sudo pip3 install -r /opt/odoo/requirements.txt
ronny@odoo17:~$ sudo pip3 install -r /opt/odoo17/requirements.txt
ronny@odoo17:~$ sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
ronny@odoo17:~$ sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
ronny@odoo17:~$ wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
ronny@odoo17:~$ sudo apt --fix-broken install
ronny@odoo17:~$ sudo dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
ronny@odoo17:~$ sudo apt install -f
ronny@odoo17:~$ sudo cp /opt/odoo17/debian/odoo.conf /etc/odoo17.conf
ronny@odoo17:~$ sudo nano /etc/odoo17.conf
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo17
db_password = False
addons_path = /opt/odoo17/addons
logfile = /var/log/odoo/odoo17.log
ronny@odoo17:~$ sudo chown odoo17: /etc/odoo17.conf
ronny@odoo17:~$ sudo chmod 640 /etc/odoo17.conf
ronny@odoo17:~$ sudo mkdir /var/log/odoo
ronny@odoo17:~$ sudo chown odoo17:root /var/log/odoo
ronny@odoo17:~$ sudo nano /etc/systemd/system/odoo17.service
[Unit]
Description=Odoo17
Documentation=http://www.odoo.com
[Service]
# Ubuntu/Debian convention:
Type=simple
User=odoo17
ExecStart=/opt/odoo17/odoo-bin -c /etc/odoo17.conf
[Install]
WantedBy=default.target
ronny@odoo17:~$ sudo chmod 755 /etc/systemd/system/odoo17.service
ronny@odoo17:~$ sudo chown root: /etc/systemd/system/odoo17.service
ronny@odoo17:~$ sudo systemctl start odoo17.service
ronny@odoo17:~$ sudo systemctl status odoo17.service