PrestaShop is a free online shopping cart platform that allows users to create an online store and sell products to an online audience. It is a simple and feature-rich application that provides the best shopping cart experience for both merchants and customers. It is written in the PHP language and Symfony PHP framework with support for the MySQL database management system. PrestaShop is available in 65 different languages and is used by many shops worldwide.

This post will explain how to install PrestaShop on Fedora Linux.

Step 1 – Install the LAMP Server

By default, the Apache and MariaDB server packages are available in the Fedora default repo. You can install both of them using the following command.

dnf install httpd mariadb-server

Once both packages are installed, you will need to install the latest PHP version to your system. To do so, add the PHP Remi repo to your system.

dnf install -y http://rpms.remirepo.net/fedora/remi-release-34.rpm
dnf module install php:remi-8.1

Next, install PHP with other required extensions using the following command.

dnf install php php-zip php-xml php-gd php-curl php-fpm php-xmlrpc php-mbstring php-mysqli php-bcmath php-dom php-posix php-cli php-pdo php-posix php-fileinfo php-json php-iconv -y
yum --enablerepo=remi install php-intl php-zip

Then, edit the PHP configuration file and modify the default settings.

nano /etc/php.ini

Change the following lines.

max_input_vars = 3000
post_max_size = 64M
upload_max_filesize = 64M
max_execution_time = 600
memory_limit = 256M
date.timezone = UTC

Save and close the file, then start and enable the Apache, MariaDB, and PHP-FPM services using the following command.

systemctl start httpd mariadb php-fpm
systemctl enable httpd mariadb php-fpm

Step 2 – Configure Database for PrestaShop

Next, you will need to create a database and user for PrestaShop. First, log in to the MariaDB shell with the following command.

mysql

Next, create a database and user for PrestaShop.

CREATE DATABASE prestadb;
CREATE USER 'prestauser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON prestadb.* TO 'prestauser'@'localhost';

Then, flush the privileges and exit from the MariaDB console.

FLUSH PRIVILEGES;
EXIT;

Step 3 – Install PrestaShop

First, download the latest version of PrestaShop using the following command.

wget https://github.com/PrestaShop/PrestaShop/releases/download/8.1.0/prestashop_8.1.0.zip

Next, create a directory for PrestaShop and extract the downloaded file inside the PrestaShop directory.

mkdir /var/www/html/prestashop
unzip prestashop_8.1.0.zip -d /var/www/html/prestashop

Next, set proper permissions and ownership to the PrestaShop directory.

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

Step 4 – Create an Apache Virtual Host for PrestaShop

Now, create an Apache virtual host configuration file to host PrestaShop on the web.

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

Add the following content.

<VirtualHost *:80>

ServerName prestashop.example.com
DocumentRoot /var/www/html/prestashop

<Directory /var/www/html/prestashop/>
    Options -Indexes +FollowSymLinks
    AllowOverride All
</Directory>

ErrorLog /var/log/httpd/prestashop-error.log
CustomLog /var/log/httpd/prestashop-access.log combined

</VirtualHost>

Save and close the file, then restart the Apache service to apply the changes.

systemctl restart httpd

Step 5 – Access PrestaShop Web UI

Now, open your web browser and access PrestaShop using the URL http://prestashop.example.com. You will see the following screen.

Select your language and click on Next. You will see the following screen.

Agree on the license and click on Next. You will see the store configuration screen.

Define your store information and click on Next. You will see the following screen.

Select demo installation and click on Next. You will see the database configuration screen.

Define your database settings and click on Next. Once the installation is finished, you will see the following page.

Now, open your terminal and remove the Install folder before logging in to the backend.

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

Next, click on Manage your store. You will see the PrestaShop login screen.

Provide your email and password then click on LOG IN. You will see the PrestaShop dashboard.

Conclusion

Congratulations! You have successfully installed PrestaShop with Apache on Fedora Linux. You can now deploy PrestaShop on your own server and sell the products online. You can now test PrestaShop on VPS hosting from Atlantic.Net!