Odoo 18 Accounting Book : Odoo ERP

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

If the operating system and Odoo version are set up correctly, Odoo can be used with Linux. The steps listed below will help you install Odoo on your Linux-based PC.

Step 1: Update your system and server to the most recent feature version first.


sudo apt-get update
sudo apt-get upgrade

Step 2: After the servers are upgraded, the next step is to protect and set up a dedicated server for operations.


sudo apt-get install openssh-server fail2ban

Step 3: You must establish a new Odoo user to serve as an administrator and keep an eye on things when the server is configured.


sudo adduser --system --home=/opt/odoo --group odoo

Step 4: With PostgreSQL, you may set up the Odoo platform on your Linux-based system. Install Postgres first using the Python code below:


sudo apt-get install -y python3-pip

In order to set up and further administer your Odoo database, you should now move from PostgreSQL to Postgres:


sudo apt-get install postgresql

Create a new user for our instance by logging in to Postgres after it has been installed.


sudo su - postgres

Now, you should create an Odoo 18 user if you are installing Odoo 18:


createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo18

The newly formed account in Odoo 18 should be set up as the root user, granting system administrators access to advanced optional capabilities.


psql
ALTER USER odoo18 WITH SUPERUSER;

Lastly, log out of Postgres and Psql:


\q
exit

Step 5: The Odoo dependencies must then be installed on the platform's designated dependencies.


sudo apt-get install -y python3-pip

Install the libraries and dependencies for the Odoo platform:


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

Lastly, use the recently installed dependencies to confirm the installation:


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: The next step is to clone Github:

Install Github on the server first, and then clone it:


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

You must clone the repository and the corresponding Github branch:


git clone https://www.github.com/odoo/odoo --depth 1 --branch 18.0 --single-branch.

Finally, end the cloning process and proceed with the Odoo installation:

exit

Step 7: Installing the necessary Python packages comes next. Installing and configuring the packages using pip3 is the first step.

sudo pip3 install -r /opt/odoo/requirements.txt

Next, in order to support the PDF report capability, you must download and install wkhtmltopdf for the Odoo platform:

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: Finally, you must configure Odoo and associated services.

In the Odoo folder, create a platform feature configuration file that may be copied to a certain location:

Sudo wget:    https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo cp /opt/odoo/debian/odoo.conf /etc/odoo.conf

Include all necessary information in the file:


sudo nano /etc/odoo.conf

Make changes to the configuration file:


[options]
; This is the password that allows database operations:
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo18
db_password = False
addons_path = /opt/odoo/addons
logfile = /var/log/odoo/odoo.log

Specify and configure the file access rights:


sudo chown odoo: /etc/odoo.conf
sudo chmod 640 /etc/odoo.conf

Next, make a log directory for the Odoo operations:


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 snippet described below 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 file you made must then be assigned the root user:


sudo chmod 755 /etc/systemd/system/odoo.service
sudo chown root: /etc/systemd/system/odoo.service

Step 9: Lastly, you must launch Odoo. First, use the following command to start the Odoo platform:


sudo systemctl start odoo.service

Next, you must verify the platform's status:


sudo systemctl status odoo.service

Use the following URL to access the platform if the status indicates that it is active.


?http://:8069?

The command can also be used to check the log file:


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 the following procedures, your Odoo platform is successfully implemented and prepared to run on a Linux-based system.

Let's now examine the process of installing the Odoo platform on Windows-based devices or PCs.

whatsapp_icon
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message