How To Install Dolibarr on Fedora 42
Dolibarr stands as a powerful open-source ERP and CRM platform designed for businesses of all sizes, from freelancers to large enterprises. This comprehensive guide walks through the complete installation process of Dolibarr on Fedora 42, providing detailed instructions for setting up a fully functional business management system. Installing Dolibarr on Fedora 42 offers organizations a cost-effective solution for managing customers, invoicing, inventory, projects, and much more without recurring licensing fees. Fedora 42 provides an excellent foundation with its built-in PHP 8.4 support and modern package management system. This tutorial covers everything from initial system preparation through security hardening, ensuring a production-ready Dolibarr installation.
What is Dolibarr ERP/CRM?
Dolibarr represents a web-based business management solution written entirely in PHP. The platform combines enterprise resource planning and customer relationship management capabilities into a single, integrated system. Unlike expensive proprietary alternatives, Dolibarr delivers essential business tools without user-based pricing models.
The software includes modules for customer and supplier management, sales proposals, invoicing, inventory tracking, project management, accounting, and human resources. Small businesses appreciate its simplicity, while larger organizations benefit from its extensibility. The modular architecture allows users to activate only required features, keeping the interface clean and performance optimal.
Self-hosting Dolibarr on Fedora 42 provides complete control over business data. Organizations maintain full ownership of sensitive information without storing it on third-party servers. The open-source nature enables customization to specific business processes and workflows. Additionally, the active community continuously develops new modules and features. With this installation complete, businesses can begin leveraging Dolibarr’s capabilities to streamline operations and improve customer relationships.
Prerequisites and System Requirements
Fedora 42 requires minimum hardware specifications for smooth operation. A dual-core processor running at 2 GHz or higher provides adequate performance. The system needs at least 2 GB of RAM, though 4 GB or more delivers better performance for concurrent users. Allocate 15 GB of disk space for the operating system and Dolibarr installation.
Software requirements include a LAMP stack configuration. Apache or Nginx serves as the web server, MariaDB or MySQL handles database operations, and PHP 8.4 processes application logic. Dolibarr requires specific PHP extensions: php-gd for image manipulation, php-mbstring for multibyte character handling, php-xml for XML parsing, php-zip for archive management, php-mysqlnd for database connectivity, php-intl for internationalization, php-curl for external API communication, php-soap for web services, php-opcache for performance optimization, php-json for data exchange, and php-bcmath for precise calculations.
Administrative access through root or sudo privileges is mandatory. Production deployments benefit from a configured domain name, though IP addresses work for testing environments. Firewall configuration knowledge helps secure the installation by controlling HTTP and HTTPS traffic.
Understanding Fedora 42 and PHP 8.4 Compatibility
Fedora 42 ships with PHP 8.4 as the default version in its repositories. This represents a significant advantage because Dolibarr fully supports PHP 8.4, eliminating compatibility concerns. The tight integration between Fedora’s package manager and PHP simplifies installation and maintenance.
DNF serves as Fedora’s package management tool, replacing the older YUM system. It handles dependency resolution automatically, ensuring all required libraries install correctly. The default Fedora repositories contain everything needed for a standard Dolibarr installation. Alternative repositories like Remi exist but aren’t necessary for basic setups.
Step 1: Update Your Fedora 42 System
System updates ensure compatibility with the latest software versions and patch security vulnerabilities. Fresh package lists and upgraded software create a stable foundation for Dolibarr installation.
Execute the update command:
sudo dnf update -y
The -y
flag automatically confirms all prompts, streamlining the update process. DNF downloads updated packages from configured repositories and installs them systematically. This process may take several minutes depending on internet speed and the number of pending updates.
Check available updates before applying them:
sudo dnf check-update
Kernel updates or major system library changes may require a reboot. Restart the system if prompted:
sudo reboot
Step 2: Install LAMP Stack Components
The LAMP stack—Linux, Apache, MySQL/MariaDB, and PHP—forms the foundation for Dolibarr. Each component plays a critical role in delivering web application functionality.
Install Apache web server:
sudo dnf install httpd -y
Apache handles HTTP requests and serves web content to browsers. The httpd package includes all necessary modules for basic web hosting.
Install MariaDB database server:
sudo dnf install mariadb-server -y
MariaDB provides robust database management with excellent MySQL compatibility. It stores all Dolibarr data including customers, products, invoices, and configuration settings.
Install PHP 8.4 with required extensions:
sudo dnf install php php-cli php-fpm php-mysqlnd php-zip php-gd php-mbstring php-xml php-json php-intl php-bcmath php-soap php-opcache php-curl -y
This single command installs the core PHP interpreter and all extensions Dolibarr needs. Each extension enables specific functionality within the application.
Install additional utilities:
sudo dnf install wget unzip -y
Wget downloads files from the internet while unzip extracts compressed archives.
Verify installations:
httpd -v
php -v
mysql --version
These commands display version information confirming successful installation.
Step 3: Configure and Secure MariaDB Database
Database security forms a critical component of any web application deployment. Proper configuration prevents unauthorized access and data breaches.
Start the MariaDB service:
sudo systemctl start mariadb
Enable MariaDB to start automatically at boot:
sudo systemctl enable mariadb
These commands ensure database availability whenever the system runs.
Run the security script:
sudo mysql_secure_installation
The script prompts for several security configurations. Set a strong root password using uppercase, lowercase, numbers, and special characters. Remove anonymous user accounts that allow unauthorized access. Disable remote root login to prevent external attacks on the administrative account. Remove the test database that serves no production purpose. Reload privilege tables to apply all changes immediately.
Create the Dolibarr database:
sudo mysql -u root -p
Enter the root password when prompted. Execute these SQL commands:
CREATE DATABASE dolibarr_db;
CREATE USER 'dolibarr_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON dolibarr_db.* TO 'dolibarr_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace StrongPassword123!
with a unique, complex password. The database user needs full privileges on the Dolibarr database but no access to other databases.
Step 4: Configure PHP for Dolibarr
PHP configuration directly impacts Dolibarr’s performance and functionality. Optimal settings prevent upload failures, timeout errors, and memory exhaustion.
Open the PHP configuration file:
sudo nano /etc/php.ini
Locate and modify these settings:
memory_limit = 512M
upload_max_filesize = 150M
post_max_size = 150M
max_execution_time = 360
date.timezone = UTC
max_input_vars = 5000
The memory limit of 512M handles complex operations and large datasets. Upload settings accommodate large file attachments and document imports. Execution time allows for lengthy operations like report generation. Timezone configuration ensures accurate timestamps. The max_input_vars setting supports forms with many fields.
Save changes and exit the editor. Restart PHP-FPM to apply modifications:
sudo systemctl restart php-fpm
Step 5: Start and Enable Apache Web Server
Apache must run continuously to serve Dolibarr to users. Service management commands control its operation.
Start Apache:
sudo systemctl start httpd
Enable Apache to start at boot:
sudo systemctl enable httpd
Verify Apache is running:
sudo systemctl status httpd
A green “active (running)” status confirms proper operation.
Configure the firewall to allow web traffic:
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --reload
These commands open ports 80 and 443 for HTTP and HTTPS connections.
Test Apache by opening a web browser and navigating to http://localhost
or the server’s IP address. The Apache welcome page should display.
SELinux on Fedora may require context adjustments:
sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/dolibarr(/.*)?"
sudo restorecon -R /var/www/html/dolibarr
These commands allow Apache to read and write Dolibarr files.
Step 6: Download Dolibarr
Obtaining the latest stable release ensures access to current features and security patches. Official sources guarantee authentic, unmodified software.
Navigate to the web root directory:
cd /var/www/html
Download the latest Dolibarr release:
sudo wget https://github.com/Dolibarr/dolibarr/archive/refs/tags/22.0.2.zip
Replace 22.0.2
with the current version number. Check the official Dolibarr website or GitHub repository for the latest release.
Alternative download using SourceForge:
sudo wget https://sourceforge.net/projects/dolibarr/files/Dolibarr%20ERP-CRM/22.0.2/dolibarr-22.0.2.zip
Developers may prefer cloning the Git repository:
sudo git clone https://github.com/Dolibarr/dolibarr.git
This method provides easy access to updates but requires Git installation.
Verify the download completed successfully:
ls -lh
The file size should match the expected download size.
Step 7: Extract and Configure Dolibarr Files
Proper file permissions prevent security vulnerabilities and application errors. Apache needs specific access rights to function correctly.
Extract the downloaded archive:
sudo unzip 22.0.2.zip
This creates a directory containing all Dolibarr files.
Rename the directory for convenience:
sudo mv dolibarr-22.0.2 dolibarr
Set ownership to the Apache user:
sudo chown -R apache:apache /var/www/html/dolibarr
The -R
flag applies ownership recursively to all subdirectories and files.
Set appropriate permissions:
sudo find /var/www/html/dolibarr -type d -exec chmod 755 {} \;
sudo find /var/www/html/dolibarr -type f -exec chmod 644 {} \;
Directories receive 755 permissions allowing Apache to read and enter them. Files get 644 permissions enabling read access while preventing unauthorized modification.
Create the documents directory with write permissions:
sudo mkdir -p /var/www/html/dolibarr/documents
sudo chmod 775 /var/www/html/dolibarr/documents
Dolibarr stores uploaded files and generated documents here.
Step 8: Configure Apache Virtual Host for Dolibarr
Virtual hosts allow Apache to serve multiple websites from a single server. Dedicated configurations optimize performance and simplify management.
Create a new virtual host file:
sudo nano /etc/httpd/conf.d/dolibarr.conf
Add this configuration:
<VirtualHost *:80>
ServerName dolibarr.example.com
ServerAlias www.dolibarr.example.com
DocumentRoot /var/www/html/dolibarr/htdocs
<Directory /var/www/html/dolibarr/htdocs>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog /var/log/httpd/dolibarr-error.log
CustomLog /var/log/httpd/dolibarr-access.log combined
</VirtualHost>
Replace dolibarr.example.com
with the actual domain name. The DocumentRoot points to the htdocs subdirectory where Dolibarr’s web files reside. AllowOverride All enables .htaccess files for URL rewriting. Custom log files facilitate troubleshooting.
Test the Apache configuration:
sudo apachectl configtest
A “Syntax OK” message confirms valid configuration.
Restart Apache to apply changes:
sudo systemctl restart httpd
Step 9: Run Dolibarr Web Installation Wizard
The graphical installation wizard simplifies initial setup through an intuitive interface. It validates system requirements and generates configuration files automatically.
Open a web browser and navigate to:
http://dolibarr.example.com
Or use the server IP address:
http://192.168.1.100/dolibarr
The first screen displays the GNU GPL license. Review and accept the terms to continue.
The system checks PHP version, required extensions, and file permissions. Green checkmarks indicate successful validation. Red errors require resolution before proceeding.
Enter database configuration details:
- Database type: mysqli
- Server name: localhost
- Database name: dolibarr_db
- Database user: dolibarr_user
- Database password: [the password created earlier]
Click “Next” to test the connection. The wizard creates necessary database tables automatically.
Create the administrator account:
- Login: admin
- Password: [strong password]
- Email: admin@example.com
Use a unique, complex password containing at least 12 characters.
The wizard generates the conf.php configuration file. Select initial modules to enable based on business needs. Basic modules include third parties, products, invoices, and proposals.
Click “Finish” to complete installation. The login page appears, ready for first access.
Step 10: Post-Installation Security Configuration
Security hardening protects against common attack vectors. Implementing these measures significantly reduces vulnerability exposure.
Remove or secure the install directory:
sudo mv /var/www/html/dolibarr/htdocs/install /var/www/html/dolibarr/htdocs/install.disabled
Renaming prevents unauthorized reinstallation attempts.
Set read-only permissions on the configuration file:
sudo chmod 440 /var/www/html/dolibarr/htdocs/conf/conf.php
This prevents modification by malicious scripts.
Install and configure SSL certificate:
sudo dnf install certbot python3-certbot-apache -y
sudo certbot --apache -d dolibarr.example.com
Let’s Encrypt provides free SSL certificates. HTTPS encrypts data transmission protecting sensitive information.
Force HTTPS redirects by editing the virtual host:
sudo nano /etc/httpd/conf.d/dolibarr.conf
Add this redirect rule:
<VirtualHost *:80>
ServerName dolibarr.example.com
Redirect permanent / https://dolibarr.example.com/
</VirtualHost>
Disable directory listing:
sudo nano /etc/httpd/conf.d/dolibarr.conf
Ensure the Options directive excludes Indexes:
Options -Indexes +FollowSymLinks
Set up automated backups:
sudo crontab -e
Add a daily backup job:
0 2 * * * mysqldump -u root -p'password' dolibarr_db > /backup/dolibarr_$(date +\%Y\%m\%d).sql
This command backs up the database daily at 2 AM.
Initial Dolibarr Configuration and Setup
Post-installation configuration customizes Dolibarr for specific business requirements. Proper setup maximizes efficiency and user adoption.
Log in using the administrator credentials. The dashboard displays key metrics and shortcuts.
Navigate to Home → Setup → Modules to activate features. Essential modules include:
- Third parties for customer and supplier management
- Products and services for inventory
- Commercial proposals for quotes
- Invoices for billing
- Payments for financial tracking
- Projects for task management
Access Home → Setup → Company to configure organization details. Enter company name, address, phone number, email, and website. Upload a logo for professional branding on documents.
Create additional user accounts through Home → Users & Groups → New User. Assign appropriate permission levels restricting access to sensitive areas. Regular employees don’t need administrative privileges.
Configure email through Home → Setup → Email. Enter SMTP server details, port, authentication credentials, and sender information. Test the configuration to ensure proper email delivery.
Customize the interface through Home → Setup → Display. Select language preferences, date formats, currency, and theme. Regional settings ensure accurate financial calculations and reporting.
Security Best Practices for Dolibarr on Fedora 42
Ongoing security maintenance prevents data breaches and unauthorized access. Layered security approaches provide comprehensive protection.
Implement strong password policies requiring minimum 12 characters with uppercase, lowercase, numbers, and symbols. Change default passwords immediately. Avoid common words and predictable patterns.
Enable two-factor authentication for administrative accounts. The Dolibarr marketplace offers 2FA modules for enhanced security. This additional layer prevents unauthorized access even if passwords are compromised.
Maintain regular update schedules for Dolibarr, Fedora, and all installed packages. Security patches address newly discovered vulnerabilities. Check for updates weekly:
sudo dnf check-update
Configure firewall rules restricting access to trusted IP addresses. Block all other connections:
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="192.168.1.0/24" accept'
Monitor system logs regularly for suspicious activity. Review Apache access and error logs:
sudo tail -f /var/log/httpd/dolibarr-access.log
sudo tail -f /var/log/httpd/dolibarr-error.log
Encrypt database connections between Dolibarr and MariaDB. Enable database backups to external storage systems. Test restore procedures periodically.
Verify file permissions remain correct after updates. Unauthorized changes may indicate compromise.
Obtain SSL certificates from trusted providers. Configure strong cipher suites in Apache. Disable outdated TLS versions.
Troubleshooting Common Installation Issues
Installation problems typically stem from permissions, configuration errors, or missing dependencies. Systematic diagnosis identifies root causes quickly.
Permission denied errors indicate incorrect file ownership or SELinux policies. Verify Apache owns all Dolibarr files:
ls -la /var/www/html/dolibarr
Check SELinux contexts:
ls -Z /var/www/html/dolibarr
Apply correct contexts if needed:
sudo restorecon -Rv /var/www/html/dolibarr
Database connection failures require verifying credentials and service status. Test database connectivity:
sudo mysql -u dolibarr_user -p dolibarr_db
Check MariaDB service:
sudo systemctl status mariadb
Missing PHP extensions cause functionality errors. Verify installed extensions:
php -m
Install missing extensions:
sudo dnf install php-extension-name -y
Apache configuration errors prevent service startup. Test configuration syntax:
sudo apachectl configtest
Review error details:
sudo journalctl -xe
Blank white pages indicate PHP errors. Enable error display temporarily in php.ini:
display_errors = On
error_reporting = E_ALL
Upload file size limitations prevent document uploads. Increase PHP limits and verify Apache has corresponding LimitRequestBody settings.
Memory exhaustion errors require increasing PHP memory_limit. Monitor actual memory usage to determine appropriate values.
Performance Optimization Tips
Optimized configurations deliver faster page loads and support more concurrent users. Performance tuning maximizes hardware resource utilization.
Enable PHP OPcache for dramatic performance improvements. Edit php.ini
:
opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=10000
opcache.revalidate_freq=60
OPcache stores compiled PHP code in memory eliminating repeated parsing.
Tune MariaDB query cache. Edit /etc/my.cnf
:
query_cache_type=1
query_cache_size=64M
query_cache_limit=2M
Add database indexes to frequently queried columns.
Configure Apache MPM settings in /etc/httpd/conf.modules.d/00-mpm.conf
:
<IfModule mpm_prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 150
MaxConnectionsPerChild 0
</IfModule>
Enable KeepAlive connections:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
Activate Gzip compression in Apache. Add to dolibarr.conf:
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>
Implement browser caching through .htaccess:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
</IfModule>
Schedule regular database optimization:
sudo mysqlcheck -u root -p --optimize dolibarr_db
Rotate logs to prevent disk space exhaustion. Configure logrotate in /etc/logrotate.d/dolibarr:
/var/log/httpd/dolibarr-*.log {
daily
rotate 14
compress
delaycompress
notifempty
create 644 apache apache
}
Congratulations! You have successfully installed Dolibar. Thanks for using this tutorial for installing Dolibar ERP and CRM open source software package on Fedora 42 Linux system. For additional help or useful information, we recommend you check the official Dolibar website.