
How to Install Odoo 15 on Ubuntu 22.04
Odoo 15 is the latest version of the Odoo open-source enterprise resource planning (ERP) software. It offers a wide range of features and tools to help businesses manage their operations, including accounting, inventory management, sales, and customer relationship management. To install this enterprise resource planning tool on Ubuntu 22.04, follow this article.
How to Install Odo15 on Ubuntu 22.04
Odoo 15 is built using the Odoo framework and is written in the Python programming language. It uses the PostgreSQL database management system, which is known for its stability, security, and scalability. This makes it a popular choice for businesses of all sizes, from small startups to large enterprises. Following steps are required to be performed to install and configure this application on Ubuntu 22.04:
Step1: Install some of the necessary dependencies required to get Odoo 15 on Ubuntu 22.04:
$ sudo apt install python3-pip wget python3-dev python3-venv python3-wheel libxml2-dev libpq-dev libjpeg8-dev liblcms2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential git libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libblas-dev libatlas-base-dev -y |
Step2: Since it is an enterprise resource plaining tool so it will require a pre-configured data base tool so install either any, I have installed PostgreSQL:
$ sudo apt install postgresql -y |
Step3: Now create a user in the database for example like I have created a user named Odoo 15 you might differ as well:
$ sudo su - postgres -c "createuser -s odoo15" |
Step 4: Another library that is needed to be installed is libss1.1 so first download its deb file:
$ wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
Now install it through Apt:
$ sudo apt install ./libssl1.1_1.1.0g-2ubuntu4_amd64.deb |
Step 5: Next, install Wkhtmltox that is a set of open-source libraries that allows users to convert HTML pages to PDF and image formats, first download its deb file:
$ wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb |
Now make the deb file executable:
$ sudo chmod +x wkhtmltox_0.12.6-1.focal_amd64.deb |
After making the file executable now install it through Apt:
$ sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb |
Step 6: Now create a symbolic link for this HTML to PDF converter to make its access easy:
$ sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf |
Step7: Next, switch to the user we created previously for PostgreSQL:
$ sudo su – odoo15 |
Now, download the Odoo15 from GitHub:
$ sudo git clone https://www.github.com/odoo/odoo –depth 1 –branch 15.0 /opt/odoo15/odoo |
Step 8: After the Odoo15 is downloaded let’s create a virtual environment for Python I have named it myodoo15-venv:
$ python3 -m venv myodoo15-venv |
Next activate this virtual environment:
$ source myodoo15-venv/bin/activate |
Step 9: Now install wheel:
$ pip3 install wheel |
After installing wheel get the text file that contains the requirements for this tool:
$ pip3 install -r odoo/requirements.txt |
Once you are done deactivate this virtual environment:
$ deactivate |
Now make a directly for custom addons in the Odoo 15 directory and exit the user Odoo15:
$ mkdir /opt/odoo15/custom-addons $ exit |
Step 10: Now create the configuration file for Odoo 15:
$ sudo nano /etc/odoo15.conf |
Next add the details given below, you can set the password of your own choice:
[options] admin_passwd = 1234567 db_host = False db_port = False db_user = odoo15 db_password = False xmlrpc_port = 8069 logfile = /var/log/odoo15/odoo.log addons_path = /opt/odoo15/odoo/addons,/opt/odoo15/custom-addons |
Step 12: Now create a log file for Odoo 15 and for that first create a directory of it in system log directory:
$ sudo mkdir /var/log/odoo15 |
Next, give the root access to the directory you created above:
$ sudo chown odoo15:root /var/log/odoo15 |
Step 13: Now to create Odoo 15 as a service create its service file:
$ sudo nano /etc/systemd/system/odoo15.service |
After you have created a service file add the below line carefully and the save the file:
[Unit] Description=Odoo15 Requires=postgresql.service After=network.target postgresql.service [Service] Type=simple SyslogIdentifier=odoo15 PermissionsStartOnly=true User=odoo15 Group=odoo15 ExecStart=/opt/odoo15/odoo-venv/bin/python3 /opt/odoo15/odoo/odoo-bin -c /etc/odoo15.conf StandardOutput=journal+console [Install] WantedBy=multi-user.target |
Step 14: After you have created the service file reload the daemon to apply the changes:
$ sudo systemctl daemon-reload |
Now enable the Odoo 15 service:
$ sudo systemctl enable --now odoo15 |
Just to be sure check the status of the service as if it is running Correctly or not:
$ Sudo systemctl status odoo15 |
Now access the Odoo15 on Ubuntu 22.04 using its IP address and the port number that was 8069:
How to remove Odoo15 from Ubuntu 22.04
To completely delete this application from Ubuntu 22.04, follow the below steps:
Step 1: First remove the directory created for this application:
$ sudo rm -R /opt/odoo15 |
Step 2: Now remove its configuration file:
$ sudo rm -f /etc/odoo15.conf |
Step 3: After that just remove its server file:
$ $ sudo rm -f /etc/init.d/odoo15-server |
Conclusion
Odoo 15 is a powerful and flexible software suite for businesses and organizations. With its range of integrated applications, integration capabilities, and customization options, it is designed to help businesses streamline their operations and increase efficiency. Whether you are a small startup or a large enterprise, Odoo 15 can help you manage your business more effectively. This article describes the detailed process for installing it on Ubuntu 22.04.