How to install the Odoo ERP/CRM platform on Ubuntu Server 20.04

How to install the Odoo ERP/CRM platform on Ubuntu Server 20.04


Odoo was once known as Open ERP and TinyERP and served as a complete Enterprise Resource Planning and Customer Relationship Management solution in one powerful, open-source package. Odoo includes all of the features you require for ERP/CRM, such as:

  • Easy-to-use UI.
  • Flexible workflows.
  • Customizable reports.
  • Stock management.
  • Sales and purchase management.
  • Task automation.
  • Marketing campaigns.
  • Help desk.
  • Point of sale.

Odoo can be used for retail, services, operations, finance, marketing, development, and more and is scalable and extendable (with thousands of installable apps).

I want to walk you through the installation of Odoo on my go-to server of choice, Ubuntu Server 20.04.

SEE: 40+ open source and Linux terms you need to know (TechRepublic Premium)

What you’ll need

The only things you’ll need to make this work are a running instance of Ubuntu Server 20.04 and a user with sudo privileges. That’s it, let’s get to work.

How to install the dependencies

The first thing we’re going to do is install the necessary dependencies. Log into your server and install these packages with:

sudo apt-get install git python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less postgresql -y

How to create the required users

We need to create a Linux user and a PostgreSQL user. First, create the Linux user with the command:

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

Next, create the PostgreSQL user with:

sudo su - postgres -c "createuser -s odoo"

How to install Odoo

We’re now ready to install the system itself. Change to the odoo user with the command:

sudo su - odoo

Next, use git to clone the latest branch of Odoo (at the time of this writing, it’s 15):

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

Change into the newly created directory with:

cd /opt/odoo

Create a new virtual Python environment with:

python3 -m venv odoo15-venv

Activate the new environment with the command:

source odoo15-venv/bin/activate

Install the required Python modules with the following commands:

pip3 install wheel

pip3 install -r odoo15/requirements.txt

The second command above will take anywhere from 5-10 minutes to complete, so either watch the output fly by or go take care of another admin task. Once the commands are finished, deactivate the environment and exit from the odoo user with:

deactivate

exit

To enable the Odoo add-on system, we need to create a directory to house the downloaded files. Create the directory and give it the necessary permissions with:

sudo mkdir /opt/odoo/odoo15-custom-addons

sudo chown odoo: /opt/odoo/odoo15-custom-addons

Copy the default configuration file into /etc with the command:

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

Open the config file for editing with:

sudo nano /etc/odoo15.conf

Edit that file so it looks like the following:

[options]

; This is the password that allows database operations:

admin_passwd = PASSWORD

db_host = False

db_port = False

db_user = odoo

db_password = False

addons_path = /opt/odoo/odoo15/addons

Where PASSWORD is a strong/unique password.

Save and close the file.

We now must create a systemd service file with:

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

 </codeIn that file, paste the following:

[Unit]

Description=Odoo15

Requires=postgresql.service

After=network.target postgresql.service

 

[Service]

Type=simple

SyslogIdentifier=odoo15

PermissionsStartOnly=true

User=odoo

Group=odoo

ExecStart=/opt/odoo/odoo15-venv/bin/python3 /opt/odoo/odoo15/odoo-bin -c /etc/odoo15.conf

StandardOutput=journal+console

 

[Install]

WantedBy=multi-user.target

Save and close the file. Reload the systemd daemon with:

sudo systemctl daemon-reload

Start and enable the Odoo service with:

sudo systemctl enable --now odoo15

How to access Odoo

Odoo is now installed and running on your server. Open a web browser and point it to http://SERVER:8069 (Where SERVER is either the IP address or domain of the hosting server). You will be prompted to fill out information for the creation of a new database (Figure A).

Figure A

Creating the Odoo database.

Make sure you copy down the random password generated for the database (or opt to use your own password). You might want to also check the box for Demo data (especially if this is your first time using Odoo).

Click Create database and the installation will complete. When it’s finished, you’ll find yourself on the Odoo Apps page (Figure B), where you can begin selecting the apps you want to install to complete your new CRM/ERP solution.

Figure B

The Odoo Apps page includes plenty of tools to add to the platform.

How to edit the default admin user in Odoo

One of the first things you’ll want to do is edit the default admin user, which is listed as Mitchel Admin and includes a random photo. To do this, click on the four squares icon in the top left and click Settings. In the resulting window (Figure C), click Manage users.

Figure C

The General Settings tab for Odoo is where you’ll take care of your initial configurations.

Click on the Mitchel Admin listing and then click Edit. You can now change the name of the admin user, add a photo, and manage the access rights, preferences, and security for the account (Figure D).

Figure D

Customizing the default admin user in Odoo.

Congratulations, you have a running CRM/ERP tool that can be expanded to fill many roles for your company.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.



Source link