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:
Arch Linux installed on your system.
Apache Webserver
MariaDB or MySQL Database Server
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.