(Last Updated On: November 6, 2018)

This guide will cover how to install Dolibarr ERP & CRM  system on Ubuntu 18.04 LTS. Dolibarr is a modern open source ERP & CRM tool written in PHP to help you manage your organization’s activity – contacts, suppliers, invoices, orders, stocks, agenda e.t.c.

We have other CRM tutorials available on our blog:

How To Install vTiger CRM on Ubuntu 18.04 LTS

How to Install SuiteCRM on Ubuntu 18.04 / CentOS 7 with Nginx

How to install Monica Personal Relationship Manager(PRM) on Ubuntu 18.04 LTS

How to Install ERPNext ERP System on Ubuntu 18.04 Bionic Beaver Linux

If you’re looking for an ERP & CRM system that works for small, medium or large companies, foundations, and freelances, then Dolibarr may be the right tool for you.

To run Dolibarr ERP & CRM on Ubuntu 18.04 server, you’ll need to have  Apache web server, PHP, and MySQL or MariaDB database server. Here are the steps to follow.

Step 1: Install PHP

Install PHP and its extensions by running the commands below on your terminal:

sudo apt update
sudo apt install -y php php-cli php-mysql php-common  php-zip php-mbstring php-xmlrpc php-curl php-soap php-gd php-xml php-intl php-ldap

Also install libapache2-mod-php extension

sudo apt install -y libapache2-mod-php

Configure PHP settings like below

sudo vim /etc/php/7.2/apache2/php.ini

Set:

date.timezone = Africa/Nairobi
memory_limit = 256M
upload_max_filesize = 64M
display_errors = On
log_errors = Off

Step 2: Install MariaDB and Create Database

Dolibarr ERP & CRM needs a database store for its data. Install MariaDB in your Ubuntu 18.04 LTS by using the guide below:

Install MariaDB 10.x on Ubuntu 18.04 and CentOS 7

If you’re a MySQL user, check:

How to Install MySQL 8.0 on Ubuntu 18.04 / 16.04

After the database server is installed, login to MySQL shell as root user and create a Database for Dolibarr ERP & CRM.

Login to the MariaDB shell:

$ mysql -u root -p

Create a database and user for Dolibarr ERP & CRM:

CREATE USER 'dolibarr'@'localhost' IDENTIFIED BY 'StrongPassword';
CREATE DATABASE dolibarr;
GRANT ALL PRIVILEGES ON dolibarr.* TO 'dolibarr'@'localhost';
FLUSH PRIVILEGES;
QUIT

Check if you can log in to Database shell as dolibarr user:

$ mysql -u dolibarr -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 42
Server version: 10.3.34-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| dolibarr           |
+--------------------+
2 rows in set (0.00 sec)

Step 3: Download Dolibarr ERP & CRM on Ubuntu 18.04

The next step is to download the latest Dolibarr ERP & CRM version to your Ubuntu 18.04 system using the wgetcommand.

Check for the latest release of Dolibarr ERP & CRM on Github.

export VER="8.0.3"
wget https://github.com/Dolibarr/dolibarr/archive/${VER}.tar.gz

Extract the archive

tar xvf ${VER}.tar.gz

Move the directory created from extraction to /srv/dolibarr

sudo mv dolibarr-${VER} /srv/dolibarr

Then set proper permissions

sudo chown -R www-data:www-data /srv/dolibarr

Step 4: Install and Configure Apache2

Install Apache2 using:

sudo apt -y install apache2
sudo a2enmod rewrite

Then create a Virtual Host file for vTiger

sudo vim /etc/apache2/sites-enabled/dolibarr.conf

Add data:

<VirtualHost *:80>
     ServerAdmin [email protected]
     ServerName example.com
     ServerAlias www.example.com
     DocumentRoot /srv/dolibarr/htdocs/

     <Directory /srv/dolibarr/htdocs>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog /var/log/apache2/dolibarr_error.log
     CustomLog /var/log/apache2/dolibarr_access.log combined
</VirtualHost>

Verify file syntax:

$ sudo apachectl -t
Syntax OK

Restart apache2 service

sudo systemctl restart apache2

Finish the installation by opening http://example.com in your browser. The first page will ask you to select your language or use browser detected.

Confirm all Installation prerequisites checks the click Start to begin the installation.

Set Database Information.

  • Database name: dolibarr
  • Driver type: MySQL / MariaDB
  • Database server: localhost
  • Login: dolibarr
  • Password: StrongPasswordConfirm settings then click Next

Click “Next step” to save configurations and finish the installation.  The last step is to set admin logins.

Login as an admin user to Dolibarr ERP & CRM management dashboard.

Thanks for visiting our site to install Dolibarr ERP & CRM on Ubuntu 18.04 LTS. Stay connected for more good articles.