In today’s world, the Internet is vital for the business world, and it is not possible to conceive that a store that opens its doors to offer its products does so without the help of mass dissemination and E-Commerce.
PrestaShop is an e-commerce solution that allows us to create our own online store. Yeah, just like you read it, our own store.
Among its features we have:
- Store Templates: You can choose from hundreds of themes to create your online store, you’ll find the perfect template for your business.
- Store builder: Create the online store of your dreams without size and scope limits and sell online.
- Adaptive desig: perfectly adapts to all types of screens and devices
- Online payment:we can choose from over 50 world-class payment solutions and payment gateways for your online sales.
- International expansion
Among many others. It also has an active community that helps to improve the experience of using the application. Today we will learn how to install it on our Debian9 server.
How to install PrestaShop in Debian 9 ?
Installing PrestaShop: Upgrading the system and installing Apache
As I always say, before installing or working on production, the first thing to do is to update the system, this allows us to always have the latest packages available, including security patches.
apt update && sudo apt -y upgrade
After having the system updated, we need to install apache:
apt install apache2
We enabled apache mod_rewrite
Installing and configuring MariaDB
Like Apache, we must install it:
apt install mariadb-server-10.1
With MariaDB installed we have to run your Scritp configuration where we will define the root password and other options. To all these questions we will answer yes.
Now we must access MariaDB from the terminal to create the database and the specific user for the use of prestashop
mysql -u root -p
Once inside, we proceed to create the database.
CREATE DATABASE prestashop;
And now we create the user dedicated to prestashop:
- prestashop is the name of the database
- prestauser refers to mariadb user name for prestashop
- prestapss is the assigned password.
You can modify these parameters for your own. We refreshed the privileges and left MariaDB.
FLUSH PRIVILEGES; exit
Installation of php
To complete the LAMP server, we need php and several of its extensions, we proceed to install them as follows:
apt install php7.0 php7.0-gd php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-curl php-xml php-cli php7.0-intl
We must restart the apache and mariadb services to take over the php installation.
systemctl restart apache2.service mysql.service
Download and installation of prestashop
We are located in the root folder and from there we start the download with wget. At the time of this tutorial, the latest stable version of prestashop is 22.214.171.124
Create a folder called prestashop, place yourself in it and unzip the downloaded file. Then move the folder to /var/www/html/
mkdir prestashop cd prestashop unzip ../prestashop_126.96.36.199.zip
mv prestashop /var/www/html/
After this we give you permission to run, read and write to the prestashop folder and you’re done!
chmod 777 -R /var/www/html/prestashop/
Accessing from the web browser to complete the installation
At this point of the installation, if everything has gone correctly, we must complete the installation from the web browser, accessing it with the ip address of the server:
Complete the installation, it’s simple, just enter the data you request and click next.
We accept the license terms
The program starts to scan the compatibility with the server, if everything is OK, the following will appear.
Then he asks us for store information and a user account.
After that, you have to configure the database parameters that you have already done.
Then it’s time to finish the installation and be able to use it.
As a recommendation, once the process is finished, the installation files should be removed.
As a conclusion we can say that there are open source solutions for e-commerce, of high quality and with a good community behind them to respond to the needs of small and medium enterprises trying to make a name for themselves in this busy world of business. Doing that without the internet and without the support of software that allows you to take your product everywhere is simply impossible.