How to Install PrestaShop on CentOS 7

r00t January 23, 2018

Install PrestaShop on CentOS 7

In this tutorial we’ll learn how to install PrestaShop on CentOS 7. We will also install and configure its prerequisites. PrestaShop is an open-source e-commerce solution which lets you maintain your own online store. It’s written in PHP programming language with support for the MySQL database management system. It also supports a variety of payment gateway systems such as PayPal, Google Checkout etc. PrestaShop supplies a motif by default and users can change the theme of the store without changing its content. Additionally, it supports add-on modules which expand the software’s built in functionalities.

I recommend to use a minimal CentOS server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install PrestaShop on CentOS 7

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

yum -y install epel-release
yum -y update

Step 2. Installing LAMP on Ubuntu 16.04.

You should check out this LAMP stack install tutorial for Ubuntu 16.04, if you haven’t installed LAMP yet. Once it’s installed, come back here and read on. We also will install the required packages for LAMP stack and the important PHP extension that PrestaShop relies on:

apt-get install php7.0-mysql php7.0-curl php7.0-json php7.0-cgi php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-gd php7.0-mbstring php7.0-zip php7.0-dom php7.0-xml

Step 3. Installing PrestaShop.

Next, you will need to download the latest stable version of the PrestaShop. You can download it with the following command:

sudo mkdir -p /var/www/html/prestashop
sudo unzip -d /var/www/html/prestashop/

Now just set the right permissions for the folders:

chmod 755 /var/www/html/prestashop/ -R
chown apache. * /var/www/html/prestashop/ -R

Step 4. Create a database for PrestaShop.

Next, we need to create a database for the PrestaShop installation:

mysql -uroot -p

Run the following command to create a database for PrestaShop:

MariaDB> CREATE DATABASE prestashopdb;
MariaDB> GRANT ALL PRIVILEGES ON prestashopdb.* TO 'prestashop'@'localhost' IDENTIFIED BY 'your-password' WITH GRANT OPTION;
MariaDB> exit

Step 5. Configure Web Server.

If you are using Apache as a web server, you need to edit your ‘/etc/httpd/conf/httpd.conf’ file. Open it with your favorite text editor and add the following lines:

<VirtualHost *:80>
    DocumentRoot /var/www/html/prestashop
    ErrorLog logs/
    CustomLog logs/ common

Save the file and restart your web server:

systemctl restart apache2

Step 6. Accessing PrestaShop.

Now you can access the PrestaShop web install wizard in your browser by entering the domain name or http://your_ip/prestashop to continue your PrestaShop installation.

Congratulation’s! You have successfully install PrestaShop on your CentOS 7 server. Thanks for using this tutorial for installing PrestaShop open source e-commerce on CentOS 7 system.

The Tags:

Leave a Comment

Comments are closed.