• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Monday, December 11, 2023
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

How to Install PrestaShop on CentOS 7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
104
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Prerequisites
  2. Step 1: Update the system
  3. Step 2: Install and configure Apache
  4. Step 3: Install and configure MariaDB
  5. Step 4: Install PHP and required extensions
  6. Step 5: Download the PrestaShop archive and prepare for installation
  7. Step 6: Finish the installation from a web browser
  8. Want to contribute?


PrestaShop is a popular open source e-commerce solution. You can use it to create your own online store for free.

In this tutorial, I will show you how to deploy a LAMP-based PrestaShop store on a Vultr CentOS 7 server instance.

Prerequisites

Before proceeding, I assume that you have:

  • Deployed a brand new Vultr CentOS 7 server instance.
  • Logged in this CentOS 7 server instance from your SSH terminal using a non-root user with sudo privileges. You can learn about how to create such a user in this Vultr tutorial.

Step 1: Update the system

Update your Vultr server instance to the latest stable status:

sudo yum update
sudo reboot

After the reboot, use the same sudo user to log into your machine again.

You need to setup the LAMP stack on your machine before you can deploy and use PrestaShop. In the following steps, I will show you how to install and configure Apache, MariaDB, and PHP.

Step 2: Install and configure Apache

Install Apache and set it to get started automatically after system reboot:

sudo yum install httpd
sudo systemctl start httpd.service
sudo systemctl enable httpd.service

Remove Apache’s default welcome page:

sudo sed -i 's/^/#&/g' /etc/httpd/conf.d/welcome.conf

Disallow Apache to display directories and files within the web root directory /var/www/html:

sudo sed -i "s/Options Indexes FollowSymLinks/Options FollowSymLinks/" /etc/httpd/conf/httpd.conf

Modify the current firewall rules so that visitors can access your online store:

sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload

Step 3: Install and configure MariaDB

Install MariaDB and set it to automatically start after system reboot:

sudo yum install mariadb mariadb-server
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Execute the secure MySQL installation process:

sudo /usr/bin/mysql_secure_installation

Go through the process in accordance with the instructions below:

Enter current password for root (enter for none): Press the Enter key
Set root password? [Y/n]: Input Y, then press the Enter key
New password: Input a new root password, then press the Enter key
Re-enter new password: Input the same password again, then press the Enter key
Remove anonymous users? [Y/n]: Input Y, then press the Enter key
Disallow root login remotely? [Y/n]: Input Y, then press the Enter key
Remove test database and access to it? [Y/n]: Input Y, then press the Enter key
Reload privilege tables now? [Y/n]: Input Y, then press the Enter key

Now, log into the MySQL shell so that you can create a dedicated database for PrestaShop:

mysql -u root -p

Input the MariaDB root password you set earlier to log in, then setup the PrestaShop database using the following commands. Be sure to replace the database name “prestashop”, the database username “prestashopuser”, and the database user password “yourpassword” in each commands with your own ones.

CREATE DATABASE prestashop;
GRANT ALL PRIVILEGES ON prestashop.* TO 'prestashopuser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

Step 4: Install PHP and required extensions

Install PHP and required extensions using YUM:

sudo yum install php php-gd php-mbstring php-mcrypt php-mysqli php-curl php-xml php-cli

Put all of the configuration changes into effect:

sudo systemctl restart httpd mariadb

Step 5: Download the PrestaShop archive and prepare for installation

Download the latest stable version of PrestaShop, which is 1.6.1.5 as of writing:

cd ~
wget https://www.prestashop.com/download/old/prestashop_1.6.1.5.zip

For future reference, you can always find the URL of the latest download from the PrestaShop official website.

Install unzip to uncompress the archive:

sudo yum install unzip
unzip prestashop_1.6.1.5.zip

Setup the proper ownership for all of the files and directories in the archive, then move them to the web root directory:

sudo chown -R apache: ~/prestashop/
sudo mv ~/prestashop/* /var/www/html/

Step 6: Finish the installation from a web browser

Visit your Vultr server from a web browser:

http://[your-Vultr-server-IP]/

If each of the prior steps were successful, you will be presented with the PrestaShop installation wizard.

Follow the instructions on the screen to finish the installation. In general, the steps of the installation will be:

  • Choose your language.
  • License agreements.
  • System compatibility.
  • Store information.
  • System configuration.
    • In this step, you need to input the database name, the database login user “root”, and the database password you setup earlier.
  • Store installation.

For security purposes, you MUST delete the /install directory after the installation:

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

Optionally, you can delete the /docs directory and the README.md file.

sudo rm -rf /var/www/html/docs/
sudo rm /var/www/html/README.md

You MUST rename the /admin directory to a private and secure name (e.g. /kdycau0197k8upr2) before you can manage the store. Choose a secure name. For example:

sudo mv /var/www/html/admin/ /var/www/html/kdycau0197k8upr2/

Afterwards, you would manage the store from the following URL:

http://[your-Vultr-server-IP]/kdycau0197k8upr2/

This path is the only one which can be used to access your PrestaShop dashboard, be sure to save it and keep it private.

That’s all. Now, you can customize and populate your store from the PrestaShop dashboard. Enjoy it.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

High-Availability Shared Drives Using Vultr Block Storage and GlusterFS

Next Post

Enable EPEL on CentOS

Next Post

Enable EPEL on CentOS

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In