PrestaShop is a powerful open-source e-commerce platform that allows you to create and manage an online store. Installing PrestaShop on AlmaLinux 9 is straightforward and can be accomplished in a few steps. In this guide, we will walk you through the installation process on your VPS server. For reliable hosting solutions, consider using windowsvps for your VPS server deployment.

Prerequisites

Before you begin, make sure you have the following:

  • A VPS server running AlmaLinux 9.
  • Root or sudo access to the server.
  • A registered domain name pointing to your server.
  • Apache, MySQL, and PHP installed on your server.

Step 1: Update Your System

Start by updating your package manager to ensure all your software is up to date:

sudo dnf update -y

Step 2: Install Required Packages

Install the necessary packages for PrestaShop. Run the following command:

sudo dnf install httpd mariadb-server php php-mysqlnd php-xml php-gd php-mbstring php-zip php-json php-curl -y

Step 3: Start and Enable Apache and MariaDB

Enable and start the Apache and MariaDB services with the following commands:

sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl start mariadb
sudo systemctl enable mariadb

Step 4: Secure Your MariaDB Installation

Run the following command to secure your MariaDB installation:

sudo mysql_secure_installation

Follow the prompts to set the root password and remove insecure default settings.

Step 5: Create a Database for PrestaShop

Log in to the MariaDB console:

sudo mysql -u root -p

Then, create a database and user for PrestaShop:

CREATE DATABASE prestashop_db;
CREATE USER 'prestashop_user'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON prestashop_db.* TO 'prestashop_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 6: Download and Install PrestaShop

Change to the web root directory and download the latest version of PrestaShop:

cd /var/www/html
wget https://download.prestashop.com/download/releases/prestashop_1.7.8.7.zip
unzip prestashop_1.7.8.7.zip
mv prestashop/* .

Remove the zip file and the now-empty folder:

rm -rf prestashop_1.7.8.7.zip prestashop

Step 7: Set Permissions

Set the correct permissions for the PrestaShop files:

sudo chown -R apache:apache /var/www/html/*
sudo chmod -R 755 /var/www/html/

Step 8: Configure Apache

Create a new Apache configuration file for PrestaShop:

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

Add the following configuration:

<VirtualHost *:80>
    DocumentRoot "/var/www/html/"
    ServerName your_domain.com
    <Directory "/var/www/html/">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Replace your_domain.com with your actual domain name.

Step 9: Restart Apache

Restart the Apache server to apply the changes:

sudo systemctl restart httpd

Step 10: Complete the Installation via Web Interface

Open your web browser and navigate to http://your_domain.com. Follow the on-screen instructions to complete the PrestaShop installation. You will need to provide the database details created earlier.

Conclusion

Congratulations! You have successfully installed PrestaShop on your AlmaLinux 9 VPS server. This powerful e-commerce platform will allow you to manage your online store effectively. For optimal performance and reliability, consider utilizing windowsvps for your next VPS server hosting solution.

Hai trovato utile questa risposta? 0 Utenti hanno trovato utile questa risposta (0 Voti)