Hướng dẫn cài đặt Odoo 14 trên Hệ điều hành Ubuntu 20.04
Odoo is a popular open-source suite of business apps that help companies to manage and run their business. It includes a wide range of applications such as CRM, e-Commerce, website builder, billing, accounting, manufacturing, warehouse, project management, inventory, and much more, all seamlessly integrated.
The following command installs Git , Pip , Node.js , and the Odoo dependencies:
Running Odoo under the root user is not allowed, as it is a security risk. We’ll create a new system user and group with home directory /opt/odoo14 that will run the Odoo service. To do so, enter the following command:
You can name the user anything you want, as long you create a PostgreSQL user with the same name.
Installing and Configuring PostgreSQL
Odoo uses PostgreSQL as the database back-end. PostgreSQL is included in the standard Ubuntu repositories. To install it, run:
sudo apt install postgresql
When the installation is completed, create a PostgreSQL user with the same name as the previously created system user. In this example, that is odoo14:
sudo su - postgres -c "createuser -s odoo14"
wkhtmltopdf is a set of open-source command-line tools for rendering HTML pages into PDF and various image formats. To print PDF reports in Odoo, you’ll need to install the wkhtmltox package. The recommended version for Odoo is version 0.12.5, which can be download from Github:
If you encounter any compilation error during the installation, make sure all required dependencies listed in the Installing Prerequisites section are installed.
Once done, deactivate the environment by typing:
that will contain the 3rd party addons:
We’ll add this directory to the addons_path parameter. This parameter defines a list of directories where Odoo searches for modules.
Switch back to your sudo user:
Create a configuration file with the following content:
sudo nano /etc/odoo14.conf
[options]; This is the password that allows database operations:admin_passwd=my_admin_passwddb_host=Falsedb_port=Falsedb_user=odoo14db_password=Falseaddons_path=/opt/odoo14/odoo/addons,/opt/odoo14/odoo-custom-addons
Do not forget to change the my_admin_passwd to something more secure.
Creating Systemd Unit File
Open your text editor and create a service unit file called odoo14.service with the following content: