How to install PrestaShop on MXLinux Latest

PrestaShop is a free and open-source e-commerce platform that allows you to create, customize, and manage an online store. In this tutorial, we will guide you on how to install PrestaShop on MXLinux Latest distribution.

Prerequisites

Before we begin with the installation, make sure to fulfill the following prerequisites:

Step 1: Download and extract PrestaShop

First, open a terminal window and navigate to the /var/www/html directory:

$ cd /var/www/html

Next, download the latest stable release of PrestaShop from their official website using the wget command:

$ sudo wget https://download.prestashop.com/download/releases/prestashop_1.7.7.0.zip

Once the download is complete, extract the downloaded file using the following command:

$ sudo unzip prestashop_1.7.7.0.zip

This command will extract the PrestaShop files into a directory named "prestashop".

Step 2: Create a new MySQL database for PrestaShop

Next, we need to create a new MySQL database and user for PrestaShop. Log in to your MySQL server using the following command:

$ sudo mysql -u root -p

Enter your MySQL root password when prompted.

Now, create a new database named "prestashop" using the following command:

CREATE DATABASE prestashop;

Create a new MySQL user named "prestashopuser" and set a strong password for this user:

CREATE USER 'prestashopuser'@'localhost' IDENTIFIED BY 'password';

Finally, grant all the necessary privileges to the "prestashopuser" account to access the prestashop database:

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

Exit from the MySQL console:

EXIT;

Step 3: Configure Apache for PrestaShop

Now, configure Apache to serve PrestaShop. Create a new virtual host configuration file for PrestaShop using the following command:

$ sudo nano /etc/apache2/sites-available/prestashop.conf

Add the following configuration to the file:

<VirtualHost *:80>
    ServerAdmin admin@example.com
    DocumentRoot /var/www/html/prestashop
    ServerName example.com
    ServerAlias www.example.com

    <Directory /var/www/html/prestashop>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Save and close the file.

Next, enable the new virtual host configuration and reload the Apache server.

$ sudo a2ensite prestashop.conf
$ sudo systemctl reload apache2

Step 4: Run PrestaShop installation script

Open your web browser and enter the following URL:

http://example.com/install

Replace "example.com" with your actual domain name.

You will see the PrestaShop installation page. Choose your language and click on the "Next" button.

On the next page, you will see the License Agreement. Read the agreement, accept it, and click on the "Next" button.

On the next page, enter your database details including database hostname, database name, database username, and password. Click on the "Test your database connection now" button.

If all is well, you will see a confirmation message. Click on the "Next" button.

On the next page, enter your store details including store name, store activity, and store email address. Click on the "Next" button.

Now, create your administrator account by entering the required details including first name, last name, email address, and password.

Click on the "Next" button when done. You will see the Installation Complete page.

Step 5: Remove installation directory and secure your PrestaShop

Finally, remove the installation directory to secure your PrestaShop instance:

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

Congratulations! You have successfully installed PrestaShop on your MXLinux Latest distribution.

You can now access your PrestaShop storefront by navigating to your website URL. To access the admin panel, navigate to http://example.com/admin and log in using your administrator account credentials.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!