Odoo 19 Accounting Book : Odoo ERP

Want to install Odoo in a Linux-based(Ubuntu) system?

Odoo can be utilised with Linux if the operating system and Odoo version are configured properly. The instructions below can be used to install Odoo on a Linux-based computer.

Step 1: Update your operating system and server to the most recent feature version.
sudo apt-get update
sudo apt-get upgrade

Step 2: After the servers are upgraded, the next step is to secure and set up a dedicated server for operations.
sudo apt-get install openssh-server fail2ban

Step 3: To function as an administrator and keep an eye on the situation, you must establish a new Odoo user after the server has been configured.
sudo adduser --system --home=/opt/odoo --group odoo

Step 4: You can use PostgreSQL to set up the Odoo platform on your Linux-based server. Install Postgres first using the Python code below:
sudo apt-get install -y python3-pip
To set up and maintain your Odoo database, you must now convert from PostgreSQL to Postgres:
sudo apt-get install postgresql

Log in and make a new user for our instance after Postgres has been installed.
sudo su - postgres

You should now create an Odoo 19 user if you are installing Odoo 19:
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo19

The newly generated account in Odoo 19 should be set up as the root user in order to grant system administrators access to advanced optional capabilities.
psql
ALTER USER odoo19 WITH SUPERUSER;


Lastly, close Postgres and Psql:
\q
exit

Step 5: After that, the platform's specified dependencies need to have the Odoo dependencies installed.
sudo apt-get install -y python3-pip
Install the Odoo platform's requirements and libraries:
sudo apt-get install python-dev python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev
Finally, verify the installation using the newly installed dependencies:
sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
sudo apt-get install -y node-less

Step 6: Cloning Github is the next step:
Before cloning it, install Github on the server:
sudo apt-get install git
Remember to modify the system user before to cloning, as Odoo states that this cannot be done after the fact:
sudo su - odoo -s /bin/bash
The repository and related Github branch need to be cloned:
git clone https://www.github.com/odoo/odoo --depth 1 --branch 19.0 --single-branch
Lastly, stop the cloning procedure and start installing Odoo:
exit

Step 7: Installing the necessary Python packages is the next step. Installing and configuring the packages with pip3 is the first step.
sudo pip3 install -r /opt/odoo/requirements.txt
To enable the PDF report feature on the Odoo platform, you must next download and install wkhtmltopdf:
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install -f

Step 8: Lastly, Odoo and related services need to be configured.
Make a platform feature configuration file in the Odoo folder that may be moved to a specific location:
sudo cp /opt/odoo/debian/odoo.conf /etc/odoo.conf
Add all relevant data to the file:
sudo nano /etc/odoo.conf
Modify the configuration file:
[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo19
db_password = False
addons_path = /opt/odoo/addons
logfile = /var/log/odoo/odoo.log

Determine and set up the file access permissions:
sudo chown odoo: /etc/odoo.conf
sudo chmod 640 /etc/odoo.conf

Create a log directory for the Odoo activities after that:
sudo mkdir /var/log/odoo
Establish and set up Odoo user access to the relevant folder:
sudo chown odoo:root /var/log/odoo
Next, set up the necessary Odoo services:
sudo nano /etc/systemd/system/odoo.service
The following excerpt must now be added to the file:
[Unit]
Description=Odoo
Documentation=http://www.odoo.com
[Service]
# Ubuntu/Debian convention:
Type=simple
User=odoo
ExecStart=/opt/odoo/odoo-bin -c /etc/odoo.conf
[Install]
WantedBy=default.target

The root user must then be assigned to the file you created:
sudo chmod 755 /etc/systemd/system/odoo.service
sudo chown root: /etc/systemd/system/odoo.service

Step 9: Finally, you need to start Odoo. First, use the following command to start the Odoo platform.
sudo systemctl start odoo.service
The platform's state must then be confirmed:
sudo systemctl status odoo.service
Use the following URL to access the platform if the status indicates that it is operational.
http://<your_server_ip>:8069
The log file can also be checked with this command:
sudo tail -f /var/log/odoo/odoo.log
To launch Odoo services after your computer has booted up, type the following command:
sudo systemctl enable odoo.service

If you follow these instructions, your Odoo platform is successfully installed and operational on a Linux-based system.
Let's now examine how to set up the Odoo platform on Windows-based computers.

WhatsApp