web counter

Wednesday, January 26, 2022

How to install Odoo 15 steps on a Ubuntu 20.04 LTS system installation?

Opensource ERP Support Services in USA

Odoo 15 introduces exciting new features, a better user experience, and performance enhancements. The database management system in Odoo 15 needs Python 3.8 and PostgreSQL. Let's get this party started right away.

How do I get old 15 to work on Ubuntu 20.04?

This article will walk you through the process of installing Odoo 15 on an Ubuntu server running version 20.04 LTS. The terminal will be used for all of these processes (Command Line Interface).

Step-1: Update the server after logging in

a. Using ssh, connect to the server:

• ssh username @ IP address

b. Ensure that system is updated:

• sudo apt-get update
• sudo apt-get upgrade

Step 2: Secure Server

a. Ensure that the system is safe against ssh assaults; Fail2ban can assist avoid ssh attacks:

• sudo apt-get install openssh-server fail2ban

Step 3: Install Python 3 and its Dependencies

a. Install the Python packages that Odoo requires:
Install pip3 as follows:

• sudo apt-get install -y python3-pip

b. Then 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-dev

c. Make sure that all of the packages have been installed correctly and that there are no issues. Some web dependencies must be installed after the Python packages have been successfully installed.

• 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 : 4 Setup Database Server (PostgreSQL)

a. The database server used by Odoo is PostgreSQL. To install and configure a database server for Odoo, follow these steps:

• sudo apt-get install postgresq

b. Create a Postgres user to manage the database in the next stage. The user name and password will be required later in the conf file
To accomplish the activities, Postgres has its own system user named 'Postgres. So, to change the user to Postgres, use the following command:

• sudo su - postgres

c. Next, we'll make an Odoo15 database user. When you run the following command, it will prompt you for a password, which you must re-enter. Keep this in mind for future reference:

• createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo15

d. The command below guarantees that the user has superuser privileges:

• psql
• ALTER USER odoo15 WITH SUPERUSER;
• Exit from psql and postgres user:
• \q
• exit

Step 5: System User

a. Next, we'll build a system user to execute Odoo roles as well as provide security. This user's access to and operations on all Odoo files and folders will be restricted.
b. Let us now create a new system user for the Odoo service, and then restrict the rights for all Odoo-related files and directories to this user.

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

Step 6: Clone the Odoo Source repository on Github.

a. We can directly clone the Community Edition source code from Odoo's GitHub repository. After the installation is complete, you can add the Enterprise edition add-ons.
Install git on the server first:

• sudo apt-get install git

b. The files will be added to the user's home directory after switching the system user to 'odoo':

• sudo su - odoo -s /bin/bash

c. The following command will clone the source directory, and the operator dot(.) at the end of the command will clone the files to the current user's home directory, which is /opt/odoo, which is the same home directory specified when the user was created:

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

d. Then exit from the user and continue the installation:

• exit

Step 7: Download and install the Python packages you'll need

a. The relevant packages must then be installed. The requirement.txt file contains a list of all the packages. As a result, we can quickly install these packages using just one command:

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

Step 8: Download and install Wkhtmltopdf

a. Odoo allows you to print reports as PDF files. Wkhtmltopdf aids in the creation of PDF reports from HTML data. Furthermore, the report engine converts the Qweb template reports to HTML format, and Wkhtmltopdf generates the PDF report:

• 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 9: Setup Conf file
a. The next step is to set up the Odoo conf file, which contains information such as the ad-ons path, database-related options, proxy parameters, and more.

As a result, a configuration file should be created in the /etc directory. A sample conf file can be found in the Debian directory of Odoo's source code. Use the following command to copy from Debian to the /etc directory:

• sudo cp /opt/odoo/debian/odoo.conf /etc/odoo.conf

b. This file contains sample values, and you should edit the file with proper values:

• sudo nano /etc/odoo.conf

c. Update 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.log

d. The 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/custom

logfile: the log file path.

e. Finally, you should set access rights of the conf file for the system user odoo:

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

f. Also, as we did before, establish a log directory to store the odoo log file, which will aid you in locating Odoo-related issues, and configure rights for the user odoo:

• sudo mkdir /var/log/odoo
• sudo chown odoo:root /var/log/odoo

Step 10: Odoo service file

a. Finally, we have to create a service to run Odoo. Let’s create a service file ‘odoo.service’ in /etc/systemd/system:

[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

b. Next set the permissions for the root user to this service file:

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

Step 11: Test Odoo 15
a. Now all the steps of installation are completed. Let's test the Odoo instance with the following command:

• sudo systemctl start odoo.service

b. Then 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.service

c. Now 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

a. You can also check the logs of 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.log

b. At last, if you want to start the Odoo service automatically after rebooting the server, use the following command:

• sudo systemctl enable odoo.service

c. If you have made any changes in the addons, restart the Odoo support service to reflect the updates on your instance using the following command:

• sudo systemctl restart odoo.service

via Ref Link : https://www.geminatecs.com/blog/how-to-install-odoo-15-steps-on-a-ubuntu-20-04-lts-system-installation

No comments:

Post a Comment

Need to Know About ODOO APPS for Mobile ERP

Portability and approachability are critical parts of the modern planet. Mobile phones are individual of the devices used to approach this c...