Introduction
Dolibarr is a versatile open-source ERP and CRM platform designed to manage various business activities such as contacts, suppliers, invoices, orders, stocks, and more. This guide will walk you through the installation process of Dolibarr on the latest version of Ubuntu.
Prerequisites
Before starting, ensure your server meets the following requirements:
- A server running the latest version of Ubuntu.
- A LAMP (Linux, Apache, MySQL, PHP) stack installed on your server.
- Access to a terminal with root privileges.
Step 1: Update Your System
Begin by updating your package list and upgrading all system packages to their latest versions. Open your terminal and execute these commands:
sudo apt update
sudo apt upgrade -y
Step 2: Install Required PHP Modules
Dolibarr requires specific PHP modules to function correctly. Install these modules using the following command:
sudo apt install -y php php-mysql php-xml php-mbstring php-curl php-gd php-zip
Step 3: Download Dolibarr
Download the latest version of Dolibarr from the official website or use wget to download directly to your server:
cd /var/www/html
wget https://sourceforge.net/projects/dolibarr/files/latest/download -O dolibarr.zip
Extract the downloaded file:
sudo apt install unzip
unzip dolibarr.zip
Rename the extracted directory for convenience:
mv dolibarr-* dolibarr
Step 4: Set Permissions
Set the correct permissions to ensure Dolibarr can write to the necessary directories:
sudo chown -R www-data:www-data /var/www/html/dolibarr
sudo chmod -R 755 /var/www/html/dolibarr
Step 5: Configure Apache
Create a new Apache configuration file for Dolibarr:
sudo nano /etc/apache2/sites-available/dolibarr.conf
Add the following configuration:
ServerAdmin admin@example.com DocumentRoot /var/www/html/dolibarr/htdocs ServerName your_domain.com ServerAlias www.your_domain.com Options Indexes FollowSymLinks AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined
Enable the new configuration and rewrite module, then restart Apache:
sudo a2ensite dolibarr.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
Step 6: Set Up the Database
Log in to your MySQL shell and create a database for Dolibarr:
mysql -u root -p
Enter the following commands in the MySQL shell:
CREATE DATABASE dolibarr;
CREATE USER 'dolibarruser'@'localhost' IDENTIFIED BY 'yourpassword';
GRANT ALL PRIVILEGES ON dolibarr.* TO 'dolibarruser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 7: Complete the Installation
Open your web browser and navigate to your server’s domain (e.g., http://your_domain.com). Follow the on-screen instructions to complete the Dolibarr installation, entering your database details when prompted.
Conclusion
You have successfully installed Dolibarr on the latest version of Ubuntu. You can now use Dolibarr to manage your business operations efficiently.







