How to Install PrestaShop on Arch Linux

PrestaShop is an e-commerce platform used for running online stores. In this tutorial, we will be installing it on Arch Linux.

Requirements:

  1. Arch Linux installed on your system.

  2. Apache Webserver

  3. MariaDB or MySQL Database Server

  4. PHP version 7.2 or later.

Installation Steps

Here are the steps for installation of PrestaShop on Arch Linux:

Step 1: Update System

Before we begin the installation process, update your system by running the following command in the terminal:

sudo pacman -Syu

Step 2: Install Apache, MySQL and PHP

Let's install the necessary packages including Apache, MySQL and PHP using the following command:

sudo pacman -S apache mariadb php php-apache php-gd php-intl php-mbstring php-xml php-zip

Step 3: Start and Enable Apache and MySQL services

Next, start and enable Apache and MySQL services by running the following commands:

sudo systemctl start httpd.service 
sudo systemctl start mariadb.service 
sudo systemctl enable httpd.service 
sudo systemctl enable mariadb.service 

Step 4: Create a MySQL Database

Now, we need to create a MySQL database for PrestaShop. Start by logging in to the MySQL shell using the following command:

mysql -u root -p

You'll now be prompt to enter the MySQL root password, which you set during MySQL installation.

Once you're in the MySQL shell, create a new database for PrestaShop by running the following query:

CREATE DATABASE prestadb;

Step 5: Download PrestaShop

After creating the database, you can download the latest version of PrestaShop from the official website at https://www.prestashop.com/fr/telecharger.

Step 6: Extract PrestaShop

Extract the PrestaShop archive using the following command:

tar -xvf prestashop_1.7.7.5.zip

Step 7: Edit Apache Config File

In the next step, we need to configure Apache for PrestaShop. Open the Apache configuration file with your favourite text editor:

sudo nano /etc/httpd/conf/httpd.conf

Add the following lines to configure the Apache settings:

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

Step 8: Move PrestaShop to Document Root

Move the extracted PrestaShop files to Apache's document root directory by running the following command:

sudo mv prestashop/ /srv/http/

Step 9: Change File Permissions

Set the appropriate permissions for the PrestaShop files by running:

sudo chown -R http:http /srv/http/prestashop/
sudo chmod -R 755 /srv/http/prestashop/

Step 10: Complete Installation

Now, open your web browser and navigate to http://localhost/prestashop/ from your web browser to start the installation process.

Follow the installation wizard which will ask you to choose a language, set up database details (dbname, dbuser, and dbpassword), store information and admin credentials.

Once you successfully complete the installation process, you can log in to your PrestaShop dashboard.

That's it! You have now successfully installed PrestaShop on Arch Linux.

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!

Alternatively, for the best virtual desktop, try Shells!