| by Arround The Web | No comments

How to Install Odoo 15 on Linux Mint 21

Odoo 15 is a customizable management software that comes in handy in many businesses, applications like inventory management, billing, e-commerce, and many others. Further read this guide to install Odoo15 on Linux Mint 21.

Installing Odoo 15 on Linux Mint 21

The process of installing Odoo 15 is quite long but is simple as there are some prerequisites that one should have to install to ensure smooth working of Odoo 15, below are some steps that one need to follow for its successful installation:

Step 1: Update the packages list of the default package manager of Linux Mint as it is advisable to do it before installing any application or software:

$ sudo apt update

Step 2: Now install all the necessary dependencies that are required to install Odoo 15 and for that use:

$ sudo apt install python3-pip python3-venv python3-wheel libxml2-dev wget python3-dev libpq-dev libjpeg8-dev liblcms2-dev libxslt1-dev libmysqlclient-dev zlib1g-dev libsasl2-dev libldap2-dev libatlas-base-dev build-essential git libssl-dev libffi-dev libjpeg-dev libblas-dev -y

Step 3: Next, install PostgreSQL on Linux Mint as it is mandatory because Odoo 15 uses it for database management:

$ sudo apt install postgresql -y

Step 4: Next, add a user named Odoo15 and for that execute:

$ sudo su - postgres -c "createuser -s odoo15"

Now, set the Odoo 15 as a user in and for that execute:

$ sudo useradd -m -d /opt/odoo15 -U -r -s /bin/bash odoo15

Step 5: Now install the libssI1.1 library on Linux Mint download its deb file by executing:

$ wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb

Now install the library using the downloaded deb file with the help of default package manager:

$ sudo apt install ./libssl1.1_1.1.0g-2ubuntu4_amd64.deb

Step 6: Now install another prerequisite that is wkhtmltox which comes with wkhtmltopdf that converts HTML into PDF and for that download it from GitHub by executing:

$ wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb

Step 7: Now make the file executable by using the chmod command like this:

$ sudo chmod +x wkhtmltox_0.12.6-1.focal_amd64.deb

Step 8: After making the file executable install it using the default package manager with the help of the command given below:

$ sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb

Step 9: Now to access the wkhtmltox let’s create a symbolic link and for that use:

$ sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf

Step 10: To see if wkhtmltopdf is installed correctly just check its version using:

$ wkhtmltopdf --version

Step 11: Now it’s time to switch to the Odoo 15 user we created previously and for that use:

$ sudo su - odoo15

Step 12: Now from GitHub download the Odoo 15 file using git clone:

$ sudo git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 /opt/odoo15/odoo

Next install virtual environment for Odoo 15 by using:

$ python3 -m venv myodoo15-venv

Afterwards activate the virtual environment we created previously by executing:

$ source myodoo15-venv/bin/activate

Step 13: Now install wheel using pip installer by executing:

$ pip3 install wheel

Step 14: Once the installation is done get the Python modules text file using the default package manager:

$ pip3 install -r odoo/requirements.txt

Now deactivate the virtual environment by using deactivate command:

$ deactivate

Step 15: Now create the directory of custom-addons using mkdir and afterwards exit the Odoo15:

$ mkdir /opt/odoo15/custom-addons

$ exit

Step 16: Now open the configuration file of Odoo 15 using nano command:

$ sudo nano /etc/odoo15.conf

Now add the lines given below in the configuration file, here change the admin password according to your preference once the changes are done save the changes and close the file.

[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 17:  Now create a log file for Odoo 15 and for that use mkdir:

$ sudo mkdir /var/log/odoo15

Step 18: Next change the ownership of Odoo 15 log file by executing:

$ sudo chown odoo15:root /var/log/odoo15

Step 19: Now to make Odoo 15 a service lets create its configuration file using nano command:

$ sudo nano /etc/systemd/system/odoo15.service

Next write the line given below in 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 20: Now save the configuration file and reload the daemon service using:

$ sudo systemctl daemon-reload

Next enable the Odoo 15 service using the systemctl command like this:

$ sudo systemctl enable --now odoo15

Step 21: Now access the Oddo 15 web page by entering the IP address and the port that is 8069 using the web browser:

Removing Odoo 15 from Linux Mint 21

If you no longer need Odoo 15 and want to remove it completely from Linux Mint 21 then follow the subsequent steps:

 Step 1: Remove the Odoo 15 directory in the opt folder of Linux Mint using:

$ sudo rm -R /opt/odoo15

Step 2: Next remove the configuration file of Odoo 15 server using:

$ sudo rm -f /etc/odoo15-server.conf

Afterwards remove the configuration file of Odoo 15 used for database configuration by executing:

$ sudo rm -f /etc/odoo15.conf

Now remove the Odoo 15 server file that is mainly used for running it as a service because it contains all the data required to run Odoo 15 as a service:

$ sudo rm -f /etc/init.d/odoo15-server

Conclusion

Odoo 15 is a customizable management tool that serves many applications like accounting, ecommerce, project management and many others. The process of getting this application on Linux Mint is quite easy as far as one follows all the necessary steps mentioned in this guide.

Share Button

Source: linuxhint.com

Leave a Reply