PostgreSQL server<\/a> with the following command:<\/p>\n\n\n\n# dnf install postgresql14 postgresql14-server<\/pre>\n\n\n\nOnce the installation is complete, initialize the PostgreSQL database:<\/p>\n\n\n\n
# \/usr\/pgsql-14\/bin\/postgresql-14-setup initdb\nInitializing database ... OK<\/pre>\n\n\n\nStart and enable the PostgreSQL service.<\/p>\n\n\n\n
# systemctl enable postgresql-14 && systemctl start postgresql-14<\/pre>\n\n\n\nCreate a new PostgreSQL user for Odoo with the following command:<\/p>\n\n\n\n
# su - postgres -c \"createuser -s odoo16\"<\/pre>\n\n\n\n<\/span>Step 4. Install Wkhtmltopdf<\/span><\/h2>\n\n\n\nA wkhtmltopdf package is an open-source tool that Odoo uses to make HTML in PDF formats to print PDF reports.<\/p>\n\n\n\n
# dnf install https:\/\/github.com\/wkhtmltopdf\/packaging\/releases\/download\/0.12.6.1-2\/wkhtmltox-0.12.6.1-2.almalinux9.x86_64.rpm\n<\/pre>\n\n\n\nVerify that wkhtmltopdf<\/code> is installed on your server:<\/p>\n\n\n\n# wkhtmltopdf --version\nwkhtmltopdf 0.12.6.1 (with patched qt)<\/pre>\n\n\n\n<\/span>Step 5. Install and configure Odoo 16<\/span><\/h2>\n\n\n\nWe need to create a new system user for our Odoo 16 instance. We will create a username odoo16<\/code> and define \/opt\/odoo16<\/code> as its home directory:<\/p>\n\n\n\n# useradd -m -d \/opt\/odoo16 -U -r -s \/bin\/bash odoo16<\/pre>\n\n\n\nNow, switch to the odoo16<\/code> the user we have created in the previous step:<\/p>\n\n\n\n# su - odoo16<\/pre>\n\n\n\nClone the Odoo 16 source code from the Odoo GitHub repository:<\/p>\n\n\n\n
$ git clone https:\/\/www.github.com\/odoo\/odoo --depth 1 --branch 16.0 \/opt\/odoo16\/odoo<\/pre>\n\n\n\nCreate a new Python virtual environment:<\/p>\n\n\n\n
$ python3 -m venv odoo16-venv<\/pre>\n\n\n\nActivate the virtual environment with the following command:<\/p>\n\n\n\n
$ source odoo16-venv\/bin\/activate<\/pre>\n\n\n\nAll Odoo dependencies are listed in the requirements.txt<\/code> file, located in the \/opt\/odoo16\/odoo<\/code> directory.<\/p>\n\n\n\nInstall the required dependencies with the following command:<\/p>\n\n\n\n
(odoo16-venv) $ export PATH=\/usr\/pgsql-14\/bin:$PATH\n(odoo16-venv) $ pip3 install -r odoo\/requirements.txt<\/pre>\n\n\n\nOnce the installation is complete, deactivate the \u201codoo16-venv<\/strong>\u201d virtual environment with the following command:<\/p>\n\n\n\n(odoo14-venv) $ deactivate<\/pre>\n\n\n\nThe following command is optional and can be used if you want to use custom modules for the Odoo instance. Execute the provided command for creating a directory for custom addons:<\/p>\n\n\n\n
# mkdir \/opt\/odoo16\/custom-addons<\/pre>\n\n\n\nNext, log out as an Odoo 16 user:<\/p>\n\n\n\n
exit<\/pre>\n\n\n\nFor debugging purposes, create a log directory for Odoo 16 and set proper ownership:<\/p>\n\n\n\n
# mkdir \/var\/log\/odoo16\n# chown -R odoo16: \/var\/log\/odoo16\/<\/pre>\n\n\n\nWe have to create a configuration file for the Odoo 16 instance as well:<\/p>\n\n\n\n
# nano \/etc\/odoo16.conf<\/pre>\n\n\n\nIn the file that we just opened, add the following lines:<\/p>\n\n\n\n
[options]\nadmin_passwd = master_password<\/strong>\ndb_host = False\ndb_port = False\ndb_user = odoo16\ndb_password = False\nxmlrpc_port = 8069\nlogfile = \/var\/log\/odoo16\/odoo.log\naddons_path = \/opt\/odoo16\/odoo\/addons,\/opt\/odoo16\/custom-addons<\/pre>\n\n\n\nNote:<\/strong> Make sure you set a strong and difficult to guess master_password<\/code>.<\/p>\n\n\n\n