FedoraRHEL Based

How To Install EspoCRM on Fedora 42

Install EspoCRM on Fedora 42

EspoCRM stands as a powerful open-source customer relationship management solution designed for businesses seeking complete control over their data and customization capabilities. Installing this web-based CRM platform on Fedora 42 provides an ideal combination of cutting-edge Linux features with enterprise-grade customer management tools. This comprehensive guide walks through every step of setting up EspoCRM on Fedora 42, from configuring the LAMP stack to implementing security best practices.

Fedora 42 offers the latest stable packages and robust security features, making it an excellent choice for hosting business-critical applications. The installation process requires careful attention to system requirements, proper configuration of web services, and thorough security implementation. Whether managing sales pipelines, customer support tickets, or marketing campaigns, EspoCRM delivers the flexibility needed for modern business operations.

Understanding EspoCRM System Requirements

Before beginning the installation process, verifying that the server meets all technical requirements ensures a smooth deployment. EspoCRM requires PHP version 8.2 through 8.4 for optimal performance and security. The application supports multiple database systems including MySQL 8.0 or higher, MariaDB 10.3 or later, and PostgreSQL 15.0+.

Several PHP extensions are mandatory for EspoCRM to function correctly. Required extensions include pdo_mysql for database connectivity, gd with FreeType support for image processing, openssl for secure communications, zip for handling compressed files, mbstring for multibyte character encoding, iconv for character set conversions, curl for external API integrations, xml and xmlwriter for data export functionality, exif for image metadata, and bcmath for precise mathematical calculations.

Optional but highly recommended extensions enhance functionality and performance. These include zmq for message queuing, pcntl and posix for process control, ldap for directory services integration, and ev for event loop support. The PHP configuration should specify max_execution_time of 180 seconds, memory_limit of at least 256MB, post_max_size of 50MB, and upload_max_filesize of 50MB to accommodate file uploads and complex operations.

Hardware requirements depend on anticipated usage. A minimum of 2GB RAM is recommended for small deployments, while larger organizations should provision 4GB or more. Allocate at least 10GB of disk space for the application, with additional capacity for database growth and file attachments.

Prerequisites and Preparation

Successful EspoCRM deployment begins with proper preparation. Access to a Fedora 42 server with a fresh installation provides the cleanest starting point. Root privileges or a sudo-enabled user account are essential for installing packages and modifying system configurations.

Basic familiarity with Linux command-line operations streamlines the installation process. Understanding file permissions, service management, and text editing proves invaluable when troubleshooting issues. Secure a domain name or note the server’s IP address for accessing the CRM interface after installation.

A stable internet connection enables downloading required packages and the EspoCRM application files. Prepare to use a text editor such as nano or vim for configuration file modifications. Understanding firewall concepts helps configure network access properly.

Fedora’s SELinux security framework adds an extra layer of protection but may require adjustment for web applications. Deciding between permissive and enforcing modes before installation prevents permission conflicts later. Initial system updates ensure all base packages receive the latest security patches and bug fixes.

Step 1: Updating Fedora 42 System

Keeping the system current with the latest packages prevents compatibility issues and security vulnerabilities. Execute the update command to refresh all installed software:

sudo dnf update -y

This command contacts Fedora repositories, checks for updated packages, and installs them automatically. The process may take several minutes depending on the number of available updates and internet connection speed.

Install essential utilities that facilitate server administration and troubleshooting:

sudo dnf -y install vim bash-completion curl wget telnet unzip

These tools provide text editing capabilities, command completion, file transfer utilities, network testing, and archive extraction. Bash completion particularly enhances productivity by auto-completing commands and file paths.

If kernel updates were applied during the system update, reboot the server to load the new kernel:

sudo reboot

After the system restarts, verify the Fedora version to confirm you’re running Fedora 42:

cat /etc/fedora-release

The output should display “Fedora release 42” confirming the correct operating system version.

Step 2: Configuring SELinux on Fedora 42

Security-Enhanced Linux (SELinux) provides mandatory access control mechanisms that enhance system security. Fedora 42 enables SELinux by default in enforcing mode. Check the current status:

sudo sestatus

This command displays the SELinux mode, policy, and status information. SELinux operates in three modes: Enforcing actively blocks unauthorized actions, Permissive logs violations without blocking them, and Disabled turns off SELinux completely.

For web applications like EspoCRM, permissive mode simplifies initial configuration while still logging potential security issues:

sudo setenforce 0

This command temporarily sets SELinux to permissive mode for the current session. To make the change permanent across reboots, modify the SELinux configuration file:

sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config

Verify the configuration change:

cat /etc/selinux/config | grep SELINUX=

The output should show “SELINUX=permissive”. While permissive mode eases troubleshooting, production environments benefit from enforcing mode with properly configured SELinux policies. Advanced administrators can create custom policies to maintain enforcing mode while allowing necessary web application operations.

Step 3: Installing Apache Web Server

Apache HTTP Server forms the foundation of the web hosting environment. Install Apache on Fedora 42 using the DNF package manager:

sudo dnf install httpd -y

Fedora includes Apache with optimized default configurations. The installation creates necessary directories, configuration files, and service definitions automatically.

Modern Apache versions support multiple processing modules (MPM). The mpm_event module provides superior performance for handling concurrent connections:

sudo grep mpm_event_module /etc/httpd/conf.modules.d/00-mpm.conf

If mpm_event is not active, consider enabling it for better resource utilization. HTTP/2 support further enhances performance by allowing multiple requests over a single connection.

Start the Apache service:

sudo systemctl start httpd

Enable Apache to launch automatically during system boot:

sudo systemctl enable httpd

These commands ensure Apache runs continuously and restarts after system reboots. Verify Apache is running correctly:

sudo systemctl status httpd

The status output should display “active (running)” in green text. Configure the firewall to allow HTTP and HTTPS 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, enabling web browsers to connect to the server. Test Apache installation by navigating to the server’s IP address in a web browser. The default Fedora Apache test page should appear, confirming successful installation.

Step 4: Installing MariaDB Database Server

MariaDB provides robust, MySQL-compatible database services with excellent performance characteristics. Install MariaDB server and client packages:

sudo dnf install mariadb-server mariadb -y

Fedora 42 includes recent MariaDB versions optimized for performance and security. Start the database service:

sudo systemctl start mariadb

Enable MariaDB to start automatically at boot time:

sudo systemctl enable mariadb

Verify the service is running properly:

sudo systemctl status mariadb

The status should indicate “active (running)”. Secure the MariaDB installation using the included security script:

sudo mysql_secure_installation

This interactive script prompts for several security configurations. Set a strong root password when prompted. Remove anonymous users that exist for testing purposes. Disallow remote root login to prevent unauthorized access. Remove the test database that comes with MariaDB by default. Reload privilege tables to apply all changes immediately.

Create a dedicated database and user account for EspoCRM. Log into MariaDB as root:

sudo mysql -u root -p

Execute the following SQL commands to create the database with proper character encoding:

CREATE DATABASE espocrm CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

The utf8mb4 character set supports full Unicode including emojis and special characters. Create a dedicated user with a strong password:

CREATE USER 'espocrmuser'@'localhost' IDENTIFIED BY 'strong_password_here';

Replace “strong_password_here” with a secure password combining uppercase, lowercase, numbers, and special characters. Grant all necessary privileges on the EspoCRM database:

GRANT ALL PRIVILEGES ON espocrm.* TO 'espocrmuser'@'localhost';

Flush privileges to activate the changes:

FLUSH PRIVILEGES;

Exit the MariaDB shell:

EXIT;

Test database connectivity using the newly created credentials to ensure proper configuration.

Step 5: Installing PHP and Required Extensions

PHP processes server-side logic and generates dynamic content for EspoCRM. Install PHP along with essential modules:

sudo dnf install php php-common

Install all EspoCRM-required PHP extensions in a single comprehensive command:

sudo dnf install php php-mysqlnd php-gd php-cli php-mbstring php-xml php-curl php-zip php-openssl php-json php-bcmath php-intl php-xmlwriter -y

Each extension serves specific purposes within EspoCRM. The php-mysqlnd extension enables MySQL and MariaDB database connectivity using native drivers for optimal performance. The php-gd extension handles image manipulation for avatar uploads, thumbnail generation, and visual content processing.

The php-mbstring extension manages multibyte character strings essential for international character support. The php-xml and php-xmlwriter extensions enable Excel export functionality and XML data processing. The php-curl extension facilitates external API integrations and webhook communications.

The php-zip extension enables extension installation, system upgrades, and backup operations involving compressed archives. The php-openssl extension provides encryption, secure connections, and cryptographic operations. The php-bcmath extension ensures accurate arbitrary precision mathematics for financial calculations.

Configure PHP settings to meet EspoCRM requirements. Locate the php.ini configuration file:

php -i | grep php.ini

Edit the configuration file using your preferred text editor:

sudo vim /etc/php.ini

Modify the following settings to recommended values:

max_execution_time = 180
memory_limit = 256M
post_max_size = 50M
upload_max_filesize = 50M
date.timezone = Your/Timezone

Replace “Your/Timezone” with the appropriate timezone such as “America/New_York” or “Europe/London”. Restart Apache to apply PHP configuration changes:

sudo systemctl restart httpd

Create a PHP information file to verify correct installation and configuration:

echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php

Access this file through a web browser at http://your-server-ip/info.php to view detailed PHP configuration. Verify that all required extensions appear in the phpinfo output. Remove this file after verification as it exposes system information:

sudo rm /var/www/html/info.php

Deleting test files prevents security information disclosure.

Step 6: Downloading EspoCRM Package

Navigate to the Apache web root directory:

cd /var/www/html

Download the latest stable EspoCRM release from the official website using wget:

sudo wget https://github.com/espocrm/espocrm/releases/download/9.2.2/EspoCRM-9.2.2.zip

Replace “8.3.5” with the current stable version number available on the EspoCRM website. Downloading directly from official sources ensures authenticity and security.

Verify the download completed successfully by checking the file size matches the expected size listed on the download page. Extract the archive to a dedicated directory:

sudo unzip EspoCRM-9.2.2.zip -d /var/www/html/espocrm

This command creates the espocrm directory and extracts all files into it. Remove the downloaded ZIP archive to free disk space:

sudo rm EspoCRM-9.2.2.zip

View the extracted directory structure to confirm all files extracted properly:

ls -la /var/www/html/espocrm/

The directory should contain folders including api, client, data, public, and various PHP files.

Step 7: Setting Correct Permissions and Ownership

Proper file permissions and ownership ensure EspoCRM functions correctly while maintaining security. Change ownership of all EspoCRM files to the Apache user:

sudo chown -R apache:apache /var/www/html/espocrm/

This command recursively changes ownership so Apache can read and write necessary files. Set appropriate directory permissions:

sudo find /var/www/html/espocrm/ -type d -exec chmod 755 {} \;

Directory permission 755 allows the owner full access while restricting others to read and execute. Set appropriate file permissions:

sudo find /var/www/html/espocrm/ -type f -exec chmod 644 {} \;

File permission 644 allows the owner to read and write while others can only read. The data directory requires special permissions for storing uploads and cache:

sudo chmod -R 775 /var/www/html/espocrm/data

Additional directories need write permissions for module installations:

sudo chmod -R 775 /var/www/html/espocrm/application/Espo/Modules
sudo chmod -R 775 /var/www/html/espocrm/client/modules

Verify permissions were applied correctly:

ls -la /var/www/html/espocrm/

Incorrect permissions cause installation failures or runtime errors. The web installer checks permissions and displays warnings for any issues requiring correction.

Step 8: Configuring Apache Virtual Host for EspoCRM

Virtual host configuration directs web traffic to the EspoCRM application. Create a new Apache configuration file:

sudo vim /etc/httpd/conf.d/espocrm.conf

Add the following virtual host configuration:

<VirtualHost *:80>
    ServerName your-domain.com
    ServerAlias www.your-domain.com
    DocumentRoot /var/www/html/espocrm
    
    <Directory /var/www/html/espocrm>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
    </Directory>
    
    ErrorLog /var/log/httpd/espocrm_error.log
    CustomLog /var/log/httpd/espocrm_access.log combined
</VirtualHost>

Replace “your-domain.com” with the actual domain name pointing to the server. The AllowOverride All directive enables .htaccess files for URL rewriting, which EspoCRM requires for clean URLs.

Verify Apache configuration syntax is correct:

sudo apachectl configtest

The command should return “Syntax OK”. If errors appear, review the configuration file for typos or formatting issues. Restart Apache to activate the new virtual host:

sudo systemctl restart httpd

The mod_rewrite module must be enabled for EspoCRM routing to function properly. Fedora’s Apache installation typically enables this module by default, but verify its presence if encountering routing issues.

Step 9: Running EspoCRM Installation Wizard

Open a web browser and navigate to the server’s domain name or IP address. The EspoCRM installation wizard automatically launches for new installations. The first screen performs permission checks on critical directories and files.

If permission errors appear in red, return to the command line and correct them using the permission commands from Step 7. All items must display green checkmarks before proceeding. Click “Next” to continue to the license agreement screen.

Read and accept the EspoCRM license agreement to proceed. The database configuration screen prompts for connection details. Enter the following information:

  • Database Type: MySQL
  • Host Name: localhost
  • Database Name: espocrm
  • User Name: espocrmuser
  • Password: the password created in Step 4

Click “Test Connection” to verify the credentials work correctly. If the test fails, double-check the database credentials and ensure MariaDB is running. System settings configuration appears after successful database connection.

Create administrator credentials with a strong, unique password meeting complexity requirements. Configure date and time formats according to regional preferences. Select the appropriate default timezone matching the server location or business operations.

Choose the default currency for financial records and transactions. Select the primary language for the interface. EspoCRM supports multiple languages with the ability to add more later.

SMTP configuration enables outgoing email functionality for notifications, password resets, and email campaigns. While optional during installation, configuring SMTP ensures full functionality. Enter SMTP server details provided by the email service provider. Test the email configuration by sending a test message.

The final installation screen displays progress as EspoCRM creates database tables, configures the system, and prepares the application. Installation typically completes within one to two minutes depending on server performance.

A success message confirms the installation completed successfully. Log in using the administrator credentials created during setup. The EspoCRM dashboard appears, displaying the main interface and confirming successful installation.

Step 10: Configuring Cron Jobs for EspoCRM

Scheduled tasks automation requires properly configured cron jobs. EspoCRM uses cron for sending scheduled emails, running workflows, performing cleanups, and executing timed processes.

Install the cron daemon if not already present:

sudo dnf install cronie -y

Start and enable the cron service:

sudo systemctl start crond
sudo systemctl enable crond

Edit the crontab for the Apache user to add the EspoCRM scheduled job:

sudo crontab -u apache -e

Add the following line to execute the EspoCRM cron script every minute:

* * * * * cd /var/www/html/espocrm; /usr/bin/php -f cron.php > /dev/null 2>&1

This cron entry changes to the EspoCRM directory, executes the cron.php script using PHP, and suppresses output. The five asterisks represent minute, hour, day of month, month, and day of week, with asterisks indicating “every” for each field.

Save and exit the crontab editor. Verify the cron job runs correctly by checking the EspoCRM logs:

sudo tail -f /var/www/html/espocrm/data/logs/espo.log

Log entries should appear showing cron execution. View scheduled jobs in the EspoCRM administration panel under Administration > Scheduled Jobs to confirm they execute properly.

Step 11: Implementing Security Best Practices

Security hardening protects sensitive business data and prevents unauthorized access. Remove installation files that could expose system information or allow reinstallation:

sudo rm -rf /var/www/html/espocrm/install

Implement HTTPS encryption using Let’s Encrypt for free SSL certificates. Install Certbot and the Apache plugin:

sudo dnf install certbot python3-certbot-apache -y

Obtain an SSL certificate for the domain:

sudo certbot --apache -d your-domain.com -d www.your-domain.com

Certbot automatically configures Apache for HTTPS and redirects HTTP traffic. Enable automatic certificate renewal:

sudo systemctl enable certbot-renew.timer

Configure two-factor authentication (2FA) in EspoCRM for administrator accounts. Navigate to Administration > Authentication > 2-Factor Authentication in the admin panel and enable it for users requiring additional security.

Implement strong password policies under Administration > Settings. Configure minimum password length of at least 12 characters, require uppercase and lowercase letters, mandate numbers and special characters, and set password expiration periods.

Configure role-based access control (RBAC) to limit user permissions based on job functions. Create custom roles under Administration > Roles defining exactly which entities and actions each user type can access.

Disable password recovery for administrative accounts to prevent social engineering attacks. Set authentication token expiration times to force periodic re-authentication. Implement IP address restrictions for administrative access if operations occur from fixed locations.

Enable audit logging under Administration > Settings to track user actions and system changes. Regular security updates maintain protection against newly discovered vulnerabilities. Check for EspoCRM updates monthly and apply them after backing up data.

Step 12: Post-Installation Configuration

Access the administration panel by clicking the menu icon and selecting Administration. Configure system settings including company name, address, and contact information. Set up outgoing email configuration for system-generated messages.

Create user roles and teams matching organizational structure. Define teams representing departments or functional groups, then assign users to appropriate teams with corresponding roles.

Customize entity relationships to reflect business processes. EspoCRM allows modification of how different entities like accounts, contacts, and opportunities relate to each other.

Configure email accounts for IMAP and SMTP integration. Connect existing email accounts to send and receive messages directly within EspoCRM, enabling comprehensive communication tracking.

Set up webhooks for integrating external applications and services. Webhooks enable real-time data synchronization between EspoCRM and other business tools.

Customize the user interface theme to match branding preferences. EspoCRM supports custom color schemes and logos for a personalized experience.

Configure workflow automation rules to streamline business processes. Create workflows that automatically update records, send emails, or trigger actions based on specified conditions.

Set up lead capture forms for website integration. Generate HTML forms that visitors can submit, automatically creating leads in EspoCRM.

Create custom fields and entities to store additional business-specific information. The flexible architecture accommodates unique data requirements without requiring programming knowledge.

Import existing data from spreadsheets or other CRM systems. The import wizard guides through mapping fields and uploading records for accounts, contacts, leads, and other entities.

Configure notification preferences controlling how users receive alerts about assigned tasks, mentions, and system events.

Step 13: Troubleshooting Common Issues

Permission-related errors frequently cause installation problems. If the installer reports permission issues, verify ownership is set to the apache user and permissions match the specified values. Rerun the permission commands from Step 7 to correct any misconfigurations.

Internal Server Error 500 typically indicates PHP errors or Apache misconfiguration. Check Apache error logs:

sudo tail -f /var/log/httpd/espocrm_error.log

Database connection failures result from incorrect credentials or MariaDB service issues. Verify the database user and password match the credentials entered during installation. Confirm MariaDB is running:

sudo systemctl status mariadb

Apache configuration syntax errors prevent the web server from starting. Test configuration before restarting:

sudo apachectl configtest

Missing PHP extension errors appear when required modules aren’t installed. Review phpinfo() output or the EspoCRM system requirements page to identify missing extensions, then install them using dnf.

Cron jobs failing to execute prevent scheduled tasks from running. Verify the cron service is active and the crontab entry is correctly formatted. Check that the PHP path is accurate by running:

which php

File upload size limitations cause failures when uploading large attachments. Increase post_max_size and upload_max_filesize in php.ini, then restart Apache.

Session timeout issues log users out prematurely. Adjust session.gc_maxlifetime in php.ini to extend session duration.

White screens or blank pages indicate fatal PHP errors. Enable error display temporarily by setting display_errors = On in php.ini to identify the issue.

Check EspoCRM application logs for detailed error messages:

sudo tail -f /var/www/html/espocrm/data/logs/espo.log

Memory limit exceeded errors occur when processing large datasets. Increase memory_limit in php.ini to 512M or higher.

Clear the EspoCRM cache when experiencing unexpected behavior:

sudo rm -rf /var/www/html/espocrm/data/cache/*

Rebuild the database schema after installing extensions or making structural changes through Administration > Rebuild.

Step 14: Optimizing EspoCRM Performance

Enable PHP OPcache to dramatically improve performance by caching compiled PHP bytecode. Install OPcache:

sudo dnf install php-opcache -y

Configure OPcache in /etc/php.d/10-opcache.ini:

opcache.enable=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60

Restart Apache to activate OPcache:

sudo systemctl restart httpd

Install and configure Redis for session storage and caching. Redis significantly reduces database load and accelerates page loads.

Adjust Apache MPM worker settings in /etc/httpd/conf.modules.d/00-mpm.conf to optimize concurrent connection handling. Tune values based on available server resources.

Optimize MariaDB performance by editing /etc/my.cnf.d/server.cnf. Adjust parameters like innodb_buffer_pool_size to allocate adequate memory for database caching.

Increase PHP memory limits for handling large import operations or complex reports. Set memory_limit to 512M or 1024M for high-volume environments.

Enable Apache mod_deflate for compressing HTTP responses. Compression reduces bandwidth usage and accelerates page loading.

Configure browser caching headers to reduce repeated resource downloads. Static files like CSS, JavaScript, and images benefit significantly from aggressive caching.

Implement database indexing optimization by reviewing slow query logs and adding indexes to frequently queried columns.

Configure image optimization settings to automatically compress uploaded images. Smaller images reduce storage requirements and improve load times.

Consider implementing a Content Delivery Network (CDN) for geographically distributed users. CDNs cache static assets closer to users, reducing latency.

Monitor system resources using tools like htop or top:

htop

Track CPU usage, memory consumption, and disk I/O to identify performance bottlenecks. Configure log rotation to prevent log files from consuming excessive disk space.

Step 15: Updating and Maintaining EspoCRM

Regular updates ensure access to new features, bug fixes, and security patches. Always create complete backups before performing updates. Back up the database:

mysqldump -u root -p espocrm > espocrm_backup_$(date +%Y%m%d).sql

Back up the EspoCRM files:

sudo tar -czf espocrm_files_backup_$(date +%Y%m%d).tar.gz /var/www/html/espocrm/

These commands create timestamped backups for easy identification. Check for updates in the EspoCRM admin panel under Administration > Upgrade. The system displays available updates with release notes describing changes.

Download upgrade packages from the official EspoCRM website. Upload the upgrade package through the administration panel and follow the upgrade wizard. Test updates in a staging environment before applying to production systems.

If an update causes issues, restore from backup. Import the database backup:

mysql -u root -p espocrm < espocrm_backup_20250101.sql

Extract the file backup:

sudo tar -xzf espocrm_files_backup_20250101.tar.gz -C /

Keep Fedora system packages current with regular updates:

sudo dnf update -y

This includes PHP, MariaDB, Apache, and system libraries. Monitor EspoCRM release notes on the official website or subscribe to update notifications.

Check extension compatibility before updating EspoCRM. Some third-party extensions may require updates to work with newer EspoCRM versions. Schedule maintenance windows during low-traffic periods for updating production systems.

Automate backups using cron jobs. Create a backup script and schedule daily execution:

sudo crontab -e

Add a line scheduling the backup script:

0 2 * * * /usr/local/bin/espocrm_backup.sh

This executes the backup script daily at 2:00 AM. Store backups in a separate location or cloud storage for disaster recovery protection.

Congratulations! You have successfully installed EspoCRM. Thanks for using this tutorial for installing EspoCRM on Fedora 42 Linux system. For additional help or useful information, we recommend you check the official EspoCRM website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button