How To Install Odoo 15 On Ubuntu 20.04 LTS Server

Enable Dark Mode! how-to-install-odoo-15-on-ubuntu-2004-lts-server.jpg By: Hajaj Roshan Aug 16,2021 How to Install Odoo 15 on Ubuntu 20.04 LTS Server

Technical Odoo 15

Odoo 15 comes with exciting new features, a better user experience, and more improvements in performance. Odoo 15 required Python 3.8 and PostgreSQL for the database management system. Let’s get started from the very beginning.

How to Install Odoo 15 on Ubuntu 20.04?

This blog will describe the installation aspects of Odoo 15 in an Ubuntu server 20.04 LTS and will help to understand its process.Note: All of these steps will go through the terminal(Command Line Interface).

Step-1: Login to the Server and Update

Login to the server using ssh: ssh <username>@<IP address>eg: ssh [email protected]Ensure that system is updated:sudo apt-get updatesudo apt-get upgrade

Step 2: Secure Server

Ensure the system is secure from ssh attacks, the use of Fail2ban will help to prevent ssh attacks:sudo apt-get install openssh-server fail2ban

Step 3: Install Python 3 and its Dependencies

Install the required python packages for Odoo:Install pip3:sudo apt-get install -y python3-pipThen install Packages 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-devMake sure that all packages are installed correctly without any errors. After successful installation of Python packages, some web dependencies are also needed to be installed. sudo apt-get install -y npmsudo ln -s /usr/bin/nodejs /usr/bin/nodesudo npm install -g less less-plugin-clean-csssudo apt-get install -y node-less

Step 4: Setup Database Server(PostgreSQL)

Odoo uses PostgreSQL as its database server. Follow the steps to install and setup the database server for Odoo:sudo apt-get install postgresqlIn the next step, create a Postgres user to handle the database. The user and given password are needed for the conf file later.Postgres has its own system user called ‘Postgres to perform the operations. So next command for changing user to Postgres:sudo su - postgresNext, let's create a database user for Odoo15. When you enter the following command, it will ask for a password and re-enter it again. Remember this for later use:createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo15The following command ensures that the user has superuser access rights:psqlALTER USER odoo15 WITH SUPERUSER;Exit from psql and Postgres user:\qexit

Step 5: System User

Next, let's create a system user to perform Odoo roles and also for security purposes. All the files and directories of Odoo’s access and operations will be limited for this user. Now let us create a new system user for the Odoo service and further then we will limit the permissions of all Odoo-related files and directories for this specific user.sudo adduser --system --home=/opt/odoo --group odoo

Step 6: Clone Odoo Source from Github Repository

With the Community Edition source code, we can directly clone from Odoo’s GitHub repository. You can add the Enterprise edition add-ons after the installation process is completed.So first install git to the server:sudo apt-get install gitNext, switch the system user to ‘odoo’ and the files will be added to the user’s home directory:sudo su - odoo -s /bin/bashThe following command will clone the source directory and the operator dot(.) at the end of the command is used to clone the files to the home directory of the current user which is /opt/odoo and is the same home directory mentioned at the time of user creation:git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 --single-branch .Then exit from the user and continue the installation:exit

Step 7: Install Required Python Packages

The next step is to install the required packages. All the packages are listed in the requirement.txt file. Therefore, we can easily install these packages with a single command:sudo pip3 install -r /opt/odoo/requirements.txtTo run Odoo smoothly, all the packages should be installed properly and you should ensure that.

Step 8: Install Wkhtmltopdf

Odoo supports printing reports as PDF files. Wkhtmltopdf helps to generate PDF reports from HTML data format. Moreover, the Qweb template reports are converted to HTML format by the report engine and Wkhtmltopdf will produce the PDF report:sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.debsudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.debsudo apt install -f

Step 9: Setup Conf file

Next, we have to configure the conf file for Odoo which contains certain necessary information such as the addons path, database-related parameters, proxy parameters, and many more. Therefore, you should create a configuration file inside the /etc directory. There is a sample conf file inside Odoo’s source, in the Debian directory. To copy from Debian to the /etc directory use the following command:sudo cp /opt/odoo/debian/odoo.conf /etc/odoo.confThis file contains sample values, and you should edit the file with proper values:sudo nano /etc/odoo.confUpdate admin password and db_password from the following sample.[options] ; This is the password that allows database operations: admin_passwd = admin db_host = False db_port = False db_user = odoo15 db_password = False addons_path = /opt/odoo/addons logfile = /var/log/odoo/odoo.logThe following aspects should be configured before the operations are conducted:db_user: the database user name.db_password: provide db user password which is given while creating the db user.admin_passwd: This is the master password of Odoo which is used to perform database operations in the database manager like create, delete, duplicate, and many more.db_host: the database host.db_port: the database port.addons_path: provide the path of directories that contain the Odoo addons directories. You can mention multiple directories separated by commas:Eg: addons_path = /opt/odoo/addons, /opt/odoo/enterprise, /opt/odoo/customlogfile: the log file path.Finally, you should set access rights of the conf file for the system user odoo:sudo chown odoo: /etc/odoo.confsudo chmod 640 /etc/odoo.confAnd create a log directory to store the log file of odoo which will help you to find Odoo-related issues and also set permissions for the user odoo as we did earlier:sudo mkdir /var/log/odoosudo chown odoo:root /var/log/odoo

Step 10: Odoo service file

Finally, we have to create a service to run Odoo. Let’s create a service file ‘odoo.service’ in /etc/systemd/system:sudo nano /etc/systemd/system/odoo.serviceAdd the following content to the newly created service 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.targetNext set the permissions for the root user to this service file:sudo chmod 755 /etc/systemd/system/odoo.servicesudo chown root: /etc/systemd/system/odoo.service

Step 11: Test Odoo 15

Now all the steps of installation are completed. Let's test the Odoo instance with the following command:sudo systemctl start odoo.serviceThen check the status of the service using the following command. And if it depicts as active, the installation of Odoo was successful:sudo systemctl status odoo.serviceNow you can access Odoo by entering the following URL:“http://<your_domain_or_IP_address>:8069”This will redirect you to the database creation page if everything is set up correctly.

Check Odoo logs

You can also check the logs of the Odoo platform that you have set up if you are facing any issues related to the installation or any other reasons with the following command. This command will show you the live logs in the terminal:sudo tail -f /var/log/odoo/odoo.logAt last, if you want to start the Odoo service automatically after rebooting the server, use the following command:sudo systemctl enable odoo.serviceIf you have made any changes in the addons, restart the Odoo service to reflect the updates on your instance using the following command:sudo systemctl restart odoo.serviceHave a look at the following blog to explore more about Install Odoo 16 Ubuntu 22.04. Install Odoo 16 Ubuntu 22.04

If you need any assistance in odoo, we are online, please chat with us.

whatsapp Whatsapp chat Chat Now

Share this article:

favicon favicon favicon « Previous Next »

Related Blogs

 Complete Overview of Rare ORM Methods in Odoo 19

Complete Overview of Rare ORM Methods in Odoo 19

 How Down Payment Features in Odoo 19 Simplify and Accelerate Sales

How Down Payment Features in Odoo 19 Simplify and Accelerate Sales

 How to Create & Configure Web Controllers in Odoo 19

How to Create & Configure Web Controllers in Odoo 19

 How Developers Can Use Cart Service in Odoo 19 with Interaction Classes

How Developers Can Use Cart Service in Odoo 19 with Interaction Classes

 An Overview of Useful Environment Methods in Odoo 19

An Overview of Useful Environment Methods in Odoo 19

18 Comments

Leave a comment

odoo-udemy

Recent Posts

 Complete Overview of Rare ORM Methods in Odoo 19

Complete Overview of Rare ORM Methods in Odoo 19

 How Down Payment Features in Odoo 19 Simplify and Accelerate Sales

How Down Payment Features in Odoo 19 Simplify and Accelerate Sales

 How to Create & Configure Web Controllers in Odoo 19

How to Create & Configure Web Controllers in Odoo 19

 How Developers Can Use Cart Service in Odoo 19 with Interaction Classes

How Developers Can Use Cart Service in Odoo 19 with Interaction Classes

 An Overview of Useful Environment Methods in Odoo 19

An Overview of Useful Environment Methods in Odoo 19

odoo-udemy 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 Name E-mail Phone Comment

Quick Links

  • Odoo
  • Odoo Apps
  • Odoo Success Pack
  • Odoo Partners
  • Buy Source code
  • Contact us
  • R&D
  • Webstories
  • Sitemap

Services

  • Odoo Customization
  • Hire Odoo Developer
  • Odoo Implementation
  • Odoo Integration
  • Odoo Support
  • Odoo Migration
  • Odoo Consultancy
  • Odoo Training
  • Odoo Licensing

Reference

  • Odoo ERP
  • Odoo Software
  • Odoo vs SAP
  • Odoo vs Dynamics
  • Odoo vs ERP Next
  • Odoo vs Netsuite
  • Odoo vs Sage
  • Odoo vs Sugar CRM
  • Odoo vs Zoho CRM

STAY IN TOUCH

phone +91 8606827707

envelope [email protected]

whatsapp +91 8606827707

Connect socially

facebook twitter facebook linkedin instagram youtube

Copyright © 2025 Cybrosys Technologies. All Rights Reserved. Privacy Policy

Từ khóa » Cài đặt Odoo 15