Dolibarr is an open source Enterprise Resource Planning (ERP) and Customer Relationship Management (CRM) software used to manage sales, purchases, inventories, and other daily activities of organizations of any size. Some primary features of Dolibarr are:
This tutorial explains how to install Dolibarr on Ubuntu 20.04.
Before you begin the tutorial, you should:
Install PHP and required extensions.
$ 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
Install MariaDB server and client.
$ sudo apt install mariadb-server mariadb-client
Secure the database server.
$ sudo mysql_secure_installation
Answer all the security questions.
Login to MariaDB shell as root user.
$ sudo mysql -u root -p
Create a database and user for Dolibarr. Replace ‘StrongPassword’ with your secure password.
CREATE USER 'dolibarr'@'localhost' IDENTIFIED BY 'StrongPassword';
CREATE DATABASE dolibarr;
GRANT ALL PRIVILEGES ON dolibarr.* TO 'dolibarr'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Verify database creation.
$ mysql -u dolibarr -p
MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| dolibarr |
+--------------------+
2 rows in set (0.00 sec)
Download Dolibarr tarball.
$ wget https://github.com/Dolibarr/dolibarr/archive/12.0.5.tar.gz
Extract the archive.
$ tar xvf 12.0.5.tar.gz
Move extracted directory to /srv/dolibarr
and delete the tarball.
$ sudo mv dolibarr-12.0.5 /srv/dolibarr
$ sudo rm 12.0.5.tar.gz
Install Apache server.
$ sudo apt -y install apache2
Install libapache2-mod-php
extension.
$ sudo apt install -y libapache2-mod-php
Create a Virtual host file.
$ sudo nano /etc/apache2/sites-available/dolibarr.conf
Add the following lines and save the file. Replace <http://Server_IP/>
with your Server IP.
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName <http://Server_IP/>
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
Enable Dolibarr configuration file, disable default configuration file, and enable Apache rewrite mode.
$ sudo a2ensite dolibarr
$ sudo a2dissite 000-default.conf
$ sudo a2enmod rewrite
Set proper directory permissions.
$ sudo chown -R www-data:www-data /srv/dolibarr
Restart Apache server.
$ sudo systemctl restart apache2
To access Dolibarr, go to your browser and visit http://Server_IP/. For example:
http://192.0.2.10/
On the setup page select the required language and click Next Step
.
Verify all installation prerequisite checks the click Start
to begin the installation.
Enter Database information. Replace ‘StrongPassword’ with your secure password.
Database name: dolibarr
Driver type: MySQL / MariaDB
Database server: localhost
Login: dolibarr
Password: StrongPassword
Click Next step
to save configurations.
On the last page, create administration credentials for Dolibarr Web UI and click Next Step
to finish the installation. Dolibarr redirects to the Login page post successful installation.
Install an SSL certificate if you plan to use Dolibarr in Production environments as SSL ensures encrypted communication.
yourdomain.tld
as an example.yourdomain.tld
and www.yourdomain.tld
which points to your server’s IP address. Follow the instructions at your domain registrar or use Vultr DNS.Edit virtual host file.
sudo nano /etc/apache2/sites-available/dolibarr.conf
Edit server name parameter and save the file.
<VirtualHost *:80>
ServerAdmin webmaster@example.com
ServerName yourdomain.tld
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>
Restart apache server to apply changes.
$ sudo systemctl restart apache2
Dolibarr should now be communicating through HTTPS.
This completes the steps to install Dolibarr on Ubuntu 20.04. For more information, refer to the official Dolibarr documentation.