Difference between revisions of "Odoo"
(Created page and filled it as far as I got) |
m (Fix me being special) |
||
Line 12: | Line 12: | ||
== Installing Odoo == | == Installing Odoo == | ||
To install Odoo in the Community edition, we need to add it's repository to the APT package manager. '''This allows Odoo to install packages on our system.''' '''Therefore you should keep the amounts of trust repositories to an absolute minimum.''' | To install Odoo in the Community edition, we need to add it's repository to the APT package manager. '''This allows Odoo to install packages on our system.''' '''Therefore you should keep the amounts of trust repositories to an absolute minimum.''' | ||
$ wget 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/18.0/nightly/deb/ ./' | sudo tee /etc/apt/sources.list.d/odoo.list | |||
$ sudo apt update && sudo apt install odoo | |||
'''Make sure that it installs odoo and not any prior versions of odoo (e.g. 'odoo-16')''' | '''Make sure that it installs odoo and not any prior versions of odoo (e.g. 'odoo-16')''' | ||
Line 20: | Line 22: | ||
=== Setting up a database === | === Setting up a database === | ||
First, we need to setup a database user for odoo. The program already creates one for us, but we might want to change the password on that. | First, we need to setup a database user for odoo. The program already creates one for us, but we might want to change the password on that. | ||
$ sudo su postgres | $ sudo su postgres | ||
$ psql | |||
$ ALTER USER odoo WITH PASSWORD 'newpassword' | |||
=== Authentication to database === | === Authentication to database === | ||
Line 26: | Line 30: | ||
$ sudo vim /etc/odoo/odoo.conf | $ sudo vim /etc/odoo/odoo.conf | ||
The file should look something like this after configuration: | The file should look something like this after configuration: | ||
[options] | [options] | ||
;admin_passwd = admin | |||
db_host = localhost | |||
db_port = 5432 | |||
db_user = odoo | |||
db_password = password | |||
More lines may be added for addon functionality. '''Do not delete those.''' | More lines may be added for addon functionality. '''Do not delete those.''' | ||
=== Allowing outside access to postgresql === | === Allowing outside access to postgresql === | ||
Follow [https://www.odoo.com/documentation/18.0/administration/on_premise/deploy.html#postgresql the Odoo documentation] Additionally, ensure that the firewall allows incoming connections to ports 5432 and 8069. | Follow [https://www.odoo.com/documentation/18.0/administration/on_premise/deploy.html#postgresql the Odoo documentation] Additionally, ensure that the firewall allows incoming connections to ports 5432 and 8069. | ||
$ sudo ufw allow 5432 | $ sudo ufw allow 5432 | ||
$ sudo ufw allow 8069 |
Latest revision as of 23:07, 17 December 2024
Introduction
This guide is written for Ubuntu 24.04 ('Noble Numbat'), postgresql 16 and Odoo version 18. This is the recommended setup. Using older versions of Odoo might require downgrading or breaking Ubuntu system packages.
Installing required packages
Odoo requires a variety of packages to function. Install them using the apt package manager.
$ sudo apt install postgresql wkhtmltopdf python3-xlwt python3-num2words
PostgreSQL is used as a database server, wkhtmltopdf converts html to pdf files.
Everything else should be covered as dependency for the odoo package. If you do run into problems building the program, execute:
$ sudo apt install python3-dev libxml2-dev libxslt1-dev npm
Installing Odoo
To install Odoo in the Community edition, we need to add it's repository to the APT package manager. This allows Odoo to install packages on our system. Therefore you should keep the amounts of trust repositories to an absolute minimum. $ wget 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/18.0/nightly/deb/ ./' | sudo tee /etc/apt/sources.list.d/odoo.list $ sudo apt update && sudo apt install odoo Make sure that it installs odoo and not any prior versions of odoo (e.g. 'odoo-16')
Configuring odoo
Setting up a database
First, we need to setup a database user for odoo. The program already creates one for us, but we might want to change the password on that.
$ sudo su postgres $ psql $ ALTER USER odoo WITH PASSWORD 'newpassword'
Authentication to database
Next, setup authentication to postgresql. You can use vim to edit the file. Edit by pressing 'i' and then typing. Save and exit with ESC, : + wq
$ sudo vim /etc/odoo/odoo.conf
The file should look something like this after configuration:
[options] ;admin_passwd = admin db_host = localhost db_port = 5432 db_user = odoo db_password = password
More lines may be added for addon functionality. Do not delete those.
Allowing outside access to postgresql
Follow the Odoo documentation Additionally, ensure that the firewall allows incoming connections to ports 5432 and 8069.
$ sudo ufw allow 5432 $ sudo ufw allow 8069