AlmaLinuxRHEL Based

How To Install PrestaShop on AlmaLinux 10

Install PrestaShop on AlmaLinux 10

Setting up an e-commerce store requires a robust foundation, and combining PrestaShop with AlmaLinux 10 creates an enterprise-grade solution for online businesses. This comprehensive tutorial walks you through the complete installation process, ensuring your e-commerce platform runs smoothly and securely.

PrestaShop stands as one of the most popular open-source e-commerce platforms worldwide, powering over 300,000 online stores. When paired with AlmaLinux 10’s enterprise-level stability and security features, you get a powerful combination that can handle everything from small business shops to large-scale retail operations.

Throughout this guide, you’ll learn how to configure the LAMP stack, optimize server settings, and complete the PrestaShop installation process. We’ll cover essential security configurations, performance optimizations, and troubleshooting tips that ensure your e-commerce store operates at peak efficiency. The entire process takes approximately 30-45 minutes, depending on your server specifications and internet connection speed.

Understanding PrestaShop and AlmaLinux 10

What is PrestaShop?

PrestaShop represents a comprehensive e-commerce solution built with PHP and powered by the Symfony framework. This open-source platform offers extensive customization options through its modular architecture, supporting multiple payment gateways, shipping methods, and thousands of community-developed themes and modules.

The platform excels in multi-store management, allowing businesses to operate multiple online shops from a single installation. Advanced features include built-in SEO tools, inventory management systems, customer relationship management capabilities, and detailed analytics reporting. PrestaShop’s multilingual and multi-currency support makes it ideal for international e-commerce operations.

Why Choose AlmaLinux 10?

AlmaLinux 10 emerges as a leading enterprise Linux distribution, offering binary compatibility with Red Hat Enterprise Linux. This 1:1 compatibility ensures access to enterprise-grade stability while maintaining the cost-effectiveness of open-source solutions.

The distribution provides extended support lifecycles, regular security updates, and a robust package management system through DNF. AlmaLinux’s commitment to community-driven development ensures long-term viability and continuous improvement. Security enhancements include SELinux integration, secure boot capabilities, and comprehensive firewall management tools that protect your e-commerce infrastructure.

System Requirements and Prerequisites

Hardware Requirements

Your server infrastructure forms the backbone of your e-commerce operation. Minimum hardware specifications include 2 CPU cores, 4GB RAM, and 20GB available storage space. However, production environments benefit significantly from enhanced specifications: 4+ CPU cores, 8GB+ RAM, and SSD storage for optimal database performance.

Network connectivity requirements include stable internet access with sufficient bandwidth to handle expected traffic loads. Consider implementing redundant network connections for mission-critical e-commerce operations. Storage requirements scale with product catalogs, customer databases, and uploaded media files.

Software Requirements

PrestaShop installation demands specific software components working in harmony. Apache HTTP Server version 2.4 or higher provides the web serving foundation, while PHP 8.1 through 8.3 ensures optimal compatibility and performance. Database requirements include MySQL 5.7+ or MariaDB 10.2+ for reliable data storage and retrieval.

Essential PHP extensions include cURL, DOM, fileinfo, GD, intl, JSON, mbstring, OpenSSL, PDO, SimpleXML, zip, and Iconv. Additional recommended extensions enhance functionality: APCu for caching, memcached for session management, and opcache for PHP performance optimization.

Access Requirements

Administrative access to your AlmaLinux 10 server is essential for installation and configuration tasks. Root privileges or sudo access enables package installation, service management, and system configuration modifications. SSH access provides secure remote administration capabilities.

Domain configuration requires DNS records pointing to your server’s IP address. SSL certificate preparation, while not mandatory for initial installation, should be planned for production deployment. Firewall access for HTTP (port 80) and HTTPS (port 443) traffic ensures proper web service functionality.

Initial Server Setup and System Update

Connecting to Your Server

Establish SSH connectivity using your preferred terminal application or SSH client. Authentication methods include password-based login or SSH key pairs for enhanced security. Connection syntax follows the standard format: ssh username@your-server-ip.

ssh root@your-server-ip

Initial connection may prompt for fingerprint verification. Accept the server fingerprint to establish the secure connection. Consider implementing SSH key authentication and disabling password authentication for production environments.

System Update Process

Begin with comprehensive system updates to ensure latest security patches and software versions. The DNF package manager handles all repository management and dependency resolution automatically.

dnf update -y
dnf install -y wget unzip nano curl

System updates may require a reboot to apply kernel updates or critical system components. Schedule reboots during maintenance windows to minimize service disruption.

reboot

Security Preparations

Basic firewall configuration protects your server from unauthorized access attempts. AlmaLinux 10 includes firewalld for comprehensive network security management.

systemctl enable firewalld
systemctl start firewalld
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

SELinux configuration requires careful attention to maintain security while allowing proper application functionality. Default enforcing mode provides optimal security for production environments.

Installing the LAMP Stack

Apache Web Server Installation

Apache HTTP Server installation through DNF package manager includes all necessary modules and dependencies. The httpd package provides the complete Apache web server functionality required for PrestaShop operation.

dnf install -y httpd
systemctl enable httpd
systemctl start httpd

Verify Apache installation success by checking service status and testing HTTP connectivity. The service should display “active (running)” status indicating successful startup.

systemctl status httpd
curl http://localhost

Apache configuration files reside in /etc/httpd/ directory. The main configuration file /etc/httpd/conf/httpd.conf contains global server settings, while virtual host configurations typically use separate files in /etc/httpd/conf.d/.

Basic Apache security enhancements include hiding server version information and disabling unnecessary modules. Edit the main configuration file to implement these security measures:

nano /etc/httpd/conf/httpd.conf

Add or modify these directives:

ServerTokens Prod
ServerSignature Off

MariaDB Database Server Setup

MariaDB installation provides robust database functionality with MySQL compatibility. The mariadb-server package includes the complete database server environment necessary for PrestaShop data storage.

dnf install -y mariadb-server mariadb
systemctl enable mariadb
systemctl start mariadb

Database security hardening through the mysql_secure_installation script addresses common security vulnerabilities. This interactive script removes test databases, disables remote root login, and sets strong password policies.

mysql_secure_installation

Follow the interactive prompts:

  • Set root password (use a strong, unique password)
  • Remove anonymous users (Y)
  • Disallow root login remotely (Y)
  • Remove test database (Y)
  • Reload privilege tables (Y)

Test database connectivity and verify proper authentication:

mysql -u root -p

Basic MariaDB performance tuning enhances database responsiveness for e-commerce workloads. Edit the MariaDB configuration file:

nano /etc/my.cnf.d/mariadb-server.cnf

Add performance optimization settings:

[mysqld]
innodb_buffer_pool_size = 256M
innodb_log_file_size = 64M
max_connections = 100
query_cache_type = 1
query_cache_size = 32M

PHP Installation and Configuration

PHP installation requires additional repositories for access to current PHP versions. The EPEL and Remi repositories provide updated PHP packages compatible with AlmaLinux 10.

dnf install -y epel-release
dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm
dnf module enable php:remi-8.2 -y

Install PHP with essential extensions for PrestaShop functionality:

dnf install -y php php-mysqlnd php-gd php-curl php-zip php-xml php-mbstring php-json php-intl php-opcache php-fileinfo php-dom php-simplexml

PHP configuration optimization enhances performance and compatibility with PrestaShop requirements. Critical php.ini settings include memory limits, upload restrictions, and execution timeouts.

nano /etc/php.ini

Modify these key settings:

memory_limit = 256M
upload_max_filesize = 20M
post_max_size = 20M
max_execution_time = 300
max_input_vars = 3000
date.timezone = "Your/Timezone"

Restart Apache to apply PHP configuration changes:

systemctl restart httpd

Verify PHP installation and loaded extensions:

php -v
php -m | grep -E "(curl|gd|json|mbstring|mysql|xml|zip)"

Database Preparation for PrestaShop

Creating PrestaShop Database

Database preparation involves creating a dedicated database environment for PrestaShop data storage. Proper database configuration ensures optimal performance and security for your e-commerce platform.

Access MariaDB with administrative privileges:

mysql -u root -p

Create the PrestaShop database with appropriate character set and collation:

CREATE DATABASE prestashop CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

UTF8MB4 character set provides complete Unicode support, essential for international e-commerce operations supporting multiple languages and special characters.

Database User Configuration

Security best practices require dedicated database users with limited privileges specific to application requirements. Avoid using root credentials for application database connections.

Create a dedicated PrestaShop database user:

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

Grant necessary privileges for PrestaShop operation:

GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashop_user'@'localhost';
FLUSH PRIVILEGES;

Test database user connectivity and privileges:

exit;
mysql -u prestashop_user -p prestashop

Document database credentials securely for use during PrestaShop installation. Strong passwords should include uppercase, lowercase, numbers, and special characters.

Downloading and Installing PrestaShop

Downloading PrestaShop Files

Navigate to Apache’s document root directory for web content placement:

cd /var/www/html

Download the latest PrestaShop release using wget. Always verify you’re downloading from official sources to ensure file integrity and security.

wget https://github.com/PrestaShop/PrestaShop/releases/download/latest/prestashop_latest.zip

Verify download completion and file integrity:

ls -la prestashop_latest.zip

Extracting and Setting Permissions

Extract PrestaShop files from the downloaded archive:

unzip prestashop_latest.zip

The extraction creates a prestashop directory containing all application files. Set proper ownership and permissions for web server access:

chown -R apache:apache prestashop/
chmod -R 755 prestashop/

Some directories require write permissions for PrestaShop functionality:

chmod -R 777 prestashop/var/
chmod -R 777 prestashop/config/
chmod -R 777 prestashop/modules/
chmod -R 777 prestashop/themes/
chmod -R 777 prestashop/img/
chmod -R 777 prestashop/upload/
chmod -R 777 prestashop/download/

Additional PHP Configuration

Fine-tune PHP settings specifically for PrestaShop requirements. Create a custom PHP configuration file for enhanced control:

nano /etc/php.d/99-prestashop.ini

Add PrestaShop-specific optimizations:

; PrestaShop optimizations
opcache.enable=1
opcache.memory_consumption=128
opcache.max_accelerated_files=4000
opcache.revalidate_freq=60

Restart Apache to apply all configuration changes:

systemctl restart httpd

Apache Virtual Host Configuration

Creating Virtual Host File

Virtual host configuration enables proper domain handling and site isolation. Create a dedicated configuration file for your PrestaShop installation:

nano /etc/httpd/conf.d/prestashop.conf

Configure the virtual host with appropriate settings:

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

The configuration enables .htaccess processing, essential for PrestaShop’s URL rewriting functionality.

Virtual Host Testing and Activation

Test Apache configuration syntax before applying changes:

httpd -t

The command should return “Syntax OK” if configuration is valid. Address any syntax errors before proceeding.

Restart Apache to activate the virtual host:

systemctl restart httpd

Test virtual host functionality by accessing your domain or server IP in a web browser. You should see the PrestaShop installation wizard.

Web-Based PrestaShop Installation Process

Starting the Installation Wizard

Access the PrestaShop installation wizard through your web browser:

http://your-domain.com

The initial screen presents language selection options. Choose your preferred language for the installation process and store administration interface.

Install PrestaShop on AlmaLinux 10

System requirements validation ensures your server meets all technical prerequisites. Green checkmarks indicate proper configuration, while red warnings require attention before proceeding.

License Agreement and Store Configuration

Accept the PrestaShop license agreement to proceed with installation. Review the terms carefully as they govern your use of the software.

Store information configuration includes:

  • Store name and main activity category
  • Country and timezone settings
  • Administrator account creation
  • Email configuration for notifications

Administrator credentials require strong passwords meeting security requirements. Document these credentials securely as they provide complete access to your e-commerce platform.

Module and Demo Data Selection

PrestaShop offers various modules for extended functionality. Essential modules include payment processors, shipping calculators, and SEO tools. Consider your specific business requirements when selecting modules.

Demo data installation provides sample products and content for testing purposes. Enable demo data for development environments but avoid it for production installations.

Database Connection Setup

Enter database credentials created during the database preparation phase:

  • Database server: localhost
  • Database name: prestashop
  • Database login: prestashop_user
  • Database password: [your-secure-password]
  • Database prefix: ps_ (default)

Test database connectivity before proceeding. Connection failures indicate credential errors or database server issues requiring resolution.

Advanced options include database engine selection and table prefix customization. Default settings work well for most installations.

Post-Installation Security and Optimization

Essential Security Steps

Immediate post-installation security measures protect your e-commerce platform from common vulnerabilities. Delete the installation directory to prevent unauthorized reinstallation attempts:

rm -rf /var/www/html/prestashop/install/

PrestaShop automatically renames the admin directory during installation for security purposes. Note the new admin URL provided at installation completion.

File permission hardening reduces security risks:

find /var/www/html/prestashop -type f -exec chmod 644 {} \;
find /var/www/html/prestashop -type d -exec chmod 755 {} \;
chmod 444 /var/www/html/prestashop/config/settings.inc.php

Performance Optimization

PHP performance tuning significantly impacts e-commerce site responsiveness. Enable OPcache for improved PHP execution:

nano /etc/php.d/10-opcache.ini

Optimize OPcache settings:

opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=7963
opcache.revalidate_freq=2
opcache.fast_shutdown=1

Apache performance optimization includes enabling compression and caching modules:

nano /etc/httpd/conf.d/performance.conf

Add performance enhancements:

LoadModule deflate_module modules/mod_deflate.so
LoadModule expires_module modules/mod_expires.so

<Location />
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
    SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
</Location>

ExpiresActive On
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"

Troubleshooting Common Issues

Installation Problems

Permission-related errors commonly occur during installation. Verify proper file ownership and permissions:

chown -R apache:apache /var/www/html/prestashop/
chmod -R 755 /var/www/html/prestashop/

Database connection failures often result from incorrect credentials or service issues. Verify MariaDB service status:

systemctl status mariadb
mysql -u prestashop_user -p prestashop

Missing PHP extensions prevent proper installation. Install missing extensions identified during system requirements check:

dnf install -y php-extension-name
systemctl restart httpd

Memory limit errors require PHP configuration adjustments:

nano /etc/php.ini
# Increase memory_limit to 256M or higher
systemctl restart httpd

Post-Installation Issues

Admin panel access problems often relate to URL rewriting or .htaccess configuration. Verify Apache mod_rewrite module is enabled:

httpd -M | grep rewrite

If mod_rewrite is missing, enable it:

nano /etc/httpd/conf/httpd.conf
# Uncomment LoadModule rewrite_module modules/mod_rewrite.so
systemctl restart httpd

Frontend display issues may indicate theme or module conflicts. Check error logs for specific error messages:

tail -f /var/log/httpd/prestashop_error.log

Module installation failures often result from insufficient permissions or PHP restrictions. Verify file permissions and PHP settings allow module uploads and installations.

Performance-related troubleshooting involves monitoring server resources and optimizing database queries. Use tools like htop for real-time resource monitoring:

dnf install -y htop
htop

Congratulations! You have successfully installed PrestaShop. Thanks for using this tutorial for installing PrestaShop on your AlmaLinux OS 10 system. For additional help or useful information, we recommend you check the official PrestaShop 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