This guide will cover how to install Dolibarr ERP & CRM system on Ubuntu 20.04|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 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 20.04|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 on Ubuntu
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/*/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 using the following commands:
sudo apt install mariadb-server mariadb-client
After the database server is installed, secure it by running the commands below:
sudo mysql_secure_installation
Login to MySQL shell as root user and create a Database for Dolibarr ERP & CRM.
sudo 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 20.04|18.04
The next step is to download the latest Dolibarr ERP & CRM version to your Ubuntu system using the wget
command.
Check for the latest release of Dolibarr ERP & CRM on Github.
release_tag=$(curl -s https://api.github.com/repos/Dolibarr/dolibarr/releases/latest | grep tag_name | cut -d '"' -f 4)
wget https://github.com/Dolibarr/dolibarr/archive/${release_tag}.tar.gz
Extract the archive
tar xvf ${release_tag}.tar.gz
Move the directory created from extraction to /srv/dolibarr
sudo mv dolibarr-${release_tag} /srv/dolibarr
Then set proper permissions
sudo chown -R www-data:www-data /srv/dolibarr
Step 4: Install and Configure Apache2 Web Server
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 erp.example.com
ServerAlias www.erp.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
Step 5: Finish Dolibarr installation on browser
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 20.04|18.04 LTS. Stay connected for more good articles.