;

How to Install PrestaShop On CentOS 7

Try it in our public cloud & Get $5 Credit
CLAIM NOW

PrestaShop is a free eCommerce shopping cart software suite for small to large businesses. It’s open source under the OSL license, and has an extensive range of modules and themes so you can customize the look and features to better suit your own situation.

Getting started

To complete this guide, you will need the following:
• 1 Node (Cloud Server or Dedicated Server) running a clean installation of CentOS 7
• All commands should be run as the root user
• A LAMP stack using Nginx, PHP and MariaDB

Tutorial

Before beginning, disable Selinux if it isn’t already.

setenforce 0
sed -i 's/enforcing/disabled/' /etc/sysconfig/selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config

Make sure your system is up to date, then install these packages required by PrestaShop:

yum -y install wget nano unzip

Prestashop also requires PHP modules which you can only obtain from the EPEL repository. This command will allow you to add the EPEL repository to your system:

yum -y install epel-release

Now you can install the necessary php modules.

yum -y install php-mysql php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-snmp php-soap php-mcrypt curl zlib

Restart the Apache daemon so it will recognize the system changes.

systemctl restart httpd.service

Next, create the database and user that Prestashop will use to store your information.

mysql -u root -p

create database prestashop;
grant all privileges on prestashop.* to 'prestashop'@'localhost' identified by 'prestashoppassword';
flush privileges;
exit

It’s finally time to download Prestashop. Unzip it into a temporary directory.

mkdir prestashop
cd prestashop
wget http://downloads.sourceforge.net/project/prestashop/prestashop%20v1/1.6.0%20stable/prestashop_1.6.1.2.zip
unzip prestashop_1.6.1.2.zip

The latest version of Prestashop is available here : https://sourceforge.net/projects/prestashop/files/

From the temporary directory, copy the content to your Document root folder.

cp prestashop/ /var/www/html/ -R

Change the permissions on the folder so that Apache, and thereby your webuser, can access it.

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

In order to finish the installation of Prestashop, visit the following URL in a browser:
http://your_ip/prestashop/

Remember the database you created? You’ll need to tell PrestaShop what the database name, username and password are. Using that information, fill out the installation form.

Once installation is complete, you should remove the install directory.

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

In order to administer your PrestaShop site, login the admin panel for the first time using this URL:
http://your_ip/prestashop/admin

For security purposes, at this time the admin directory will be renamed to another name in your server.

To find out what this new name is, enter this command in your terminal window:

cd /var/www/html/prestashop
ls

[root@centos7 prestashop]# ls
Adapter architecture.md classes CONTRIBUTING.md controllers css download footer.php images.inc.php index.php js log modules pdf themes translations webservice
admin860ydydgp cache config CONTRIBUTORS.md Core docs error500.html header.php img init.php localization mails override README.md tools upload

The new admin directory takes the form of adminXXXXX. For example, if it’s admin860ydydgp, then this is the URL you will need to use to login to the admin panel in the future:
http://your_ip/admin860ydydgp

This directory is random; it will change with every installation.

Conclusion

With PrestaShop installed, you have now joined the ranks of thousands of other happy online shop owners. Your customers will enjoy a shopping cart experience known for its simplicity and efficiency. If this guide was helpful to you, kindly share it with others who may also be interested.