How To Install Zen Cart On CentOS 7 Linux

CentOS Linux is a community-supported distribution derived from sources freely provided to the public by Red Hat for Red Hat Enterprise Linux (RHEL). As such, CentOS Linux aims to be functionally compatible with RHEL.



The CentOS Project mainly changes packages to remove upstream vendor branding and artwork. CentOS Linux is no-cost and free to redistribute. Each CentOS version is maintained for up to 10 years (by means of security updates — the duration of the support interval by Red Hat has varied over time with respect to Sources released).

A new CentOS version is released approximately every 2 years and each CentOS version is periodically updated (roughly every 6 months) to support newer hardware. This results in a secure, low-maintenance, reliable, predictable and reproducible Linux environment.

You can download CentOS from here. You can directly download the ISO file format disk image from here.

we will learn how we can install Zen Cart on our CentOS 7 Linux distribution.

What is Zen Cart?

Zen Cart is an online store management system. It is PHP-based, using a MySQL database and HTML components. Support is provided for numerous languages and currencies, and it is freely available under the GNU General Public License. Zen Cart branched from osCommerce as a separate project in 2003. Beyond some aesthetic changes, the major differences between the two systems come from Zen Cart’s architectural changes (for example, a template system) and additional included features in the core. The release of the 1.3.x series further differentiated Zen Cart by moving the template system from its historic tables-based layout approach to one that is largely CSS-based.

Zen Cart truly is the art of e-commerce; free, user-friendly, open source shopping cart software. The ecommerce web site design program is developed by a group of like-minded shop owners, programmers, designers, and consultants that think ecommerce web design could be, and should be, done differently.

Some shopping cart solutions seem to be complicated programming exercises instead of responding to users’ needs, Zen Cart® puts the merchants and shoppers requirements first. Similarly, other shopping cart software programs are nearly impossible to install and use without an IT degree, Zen Cart® can be installed and set-up by anyone with the most basic web site building and computer skills.

Zen Cart is supported by a large and friendly community / forum where any one can take technical help regarding Zen Cart. Here is the official forum link for you guys.

It has the following features

  • Freely Customizable
  • Easy Integration with Payment Gateway
  • Ready immediately
  • Free support and many more.

To know more about Zen Cart, visit this link. To download latest Zen Cart from here.



To install Zen Cart, we will need these following thing that needs to be installed or available on our CentOS 7 Linux server.

  • Apache as Web Server
  • PHP
  • MySQL as Database

Required PHP libraries / modules

  • Curl
  • ZIP
  • Zlib
  • GD
  • Mcrypt
  • Mbstrings

To know more about server requirements to run Zen Cart, please visit this page.

Make sure your firewall / iptables or SELinux is not blocking any port(s) which is required over here or you don’t have any problem with proper user permission.

To disable SELinux, type the following

setenforce 0

Let’s update the CentOS 7 Linux server first. This is a good practise to keep your server up to date. To do so, issue the below command one after another and wait till it gets updated. It will depends on your internet speed and it will take a long. So, please have patience.

sudo yum clean all
sudo yum -y update

You will see something like below image once you are done with it. Depending on how old your system softwares are or which packages are needs to be updated. The below image indicates an successful update and may require to reboot system as well.


Installing Apache as web server

To install Apache on your CentOS 7, issue the below command on your terminal.

sudo yum -y install httpd

This will download and install Apache as a web server on the system.

Let’s start Apache by issuing the below command.

sudo systemctl start httpd

Set Apache at start or booting time so after every reboot, it get started automatically without manual start.

sudo systemctl enable httpd

Test Apache

To test apache issue the below command.

sudo systemctl status httpd

This will show the status of Apache for you.

Or you can open a web browser and type “localhost” without the double quote in to the address bar. You will see something like this.


It indicates that our web server up and running 🙂

You may need to enable mod_rewrite module as well. Just open the file located on /etc/httpd/conf/httpd.conf by your favorite file editor and change the following line

AllowOverride None


AllowOverride All

We are done with Apache.

Installing MySQL / MariaDB

To install MySQL / MariaDB on to your system, issue the below command.

sudo yum install mariadb-server mariadb

This will download and install MySQL / MariaDB on to the system.

To start the MariaDB server, issue the below command.

sudo systemctl start mariadb

Now, we need to set the password for the “root” user of MySQL / MariaDB. Let’s do it by typing the following and this is must for security reason.

sudo mysql_secure_installation

You will see something like this. Hit Y to continue and type a complex password and remember it.


After setting the root password, you will see something like below image.


Now, you will get few prompts on your terminal with Y/N options.

Hit Y for the prompt “Remove anonymous users?”

Hit Y for the prompt “Disallow root login remotely?”

Hit Y for the prompt “Remove test database and access to it?”

Hit Y for the prompt “Reload privilege tables now?”

After finishing all the prompts, you will see something like below.


We are done with MySQL / MariaDB.

Installing PHP 

To install PHP, open a terminal and issue the below command.

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

This will download and install PHP on your CentOS 7 system along with some others PHP modules which are required for Zen Cart.

Installing phpMyAdmin

To install phpMyAdmin, issue the below command in the terminal.

sudo yum -y install epel-release

And then issue the below command again.

sudo yum -y install phpmyadmin

After installing PHP, we need to restart the Apache or other web server in order to work with PHP. Type the following to do so.

sudo systemctl restart httpd.service

To test whether you can access phpMyAdmin or not, open any web browser and type the following in the address bar.


You will see something like this.


We are done installing PHP.

Installing Zen Cart

Create a folder called zencart and change directory to that zencart folder.

mkdir zencart
cd zencart

Download the latest Zen Cart from here. This will download a zip archive format file with a name “”.

Let’s unzip it by typing the below command on the terminal.

sudo unzip

After unzipping the zip archive file, you will get a folder name “zen-cart-v1.5.4-12302014”. Rename this zen-cart-v1.5.4-12302014 folder to zencart.

Now, copy this “zencart” folder to the /var/www/html folder path by doing the following.

sudo cp -avr zencart /var/www/html

Now, move to the /var/www/html folder and issue the below two commands.

sudo chmod -R 775 zencart
sudo chown apache:apache zencart

Now, type the following in your web browser address bar.


You will see the below image.


Click “Click here” link to begin installation. After clicking ” Click here” link, you will see something like this.


Click, “Continue” button to move forward. After clicking “Continue” button, you will see something like this below image. Select “I have read and agree to abide by the Terms & Conditions as stated above.” just like below image and click “Continue” button.


Now you will see something like this. Make sure you have green tick for everything. If you have any problem over here, please fix it by Googling it. Click “Install” button to install it. If you encounter any problem then fix it and click “Re-Check” button and then click “Install” button.


After that, you will see an image like below image.


Now, we need to create a database with a name whatever you wish for installing Zen Cart.

Let’s create the database then. To do so, open the web browser and type the following.


Then it will ask for a user name & password. Type “root” as user name and the password that you had set earlier while installing MySQL/ MariaDB. I hope that you can remember that. Once you are logged in, you will see something like this.


Now click New from the left top corner marked as red in the following image.


After clicking New, you will see something like below image. Type a database name and click “Create” button. Here, I am typing iftekher for my database name. You can type whatever you wish.


We are done creating our database for installing Zen Cart.

Now, move back to the Zen Cart installation. Fill the form just like below images. Type “localhost” as Database Host, “root” as Database Username, Use your MySQL password for the Database Password field, type your Database Name ( I am typing “iftekher” for my Database name )  that you created earlier by using PhpMyAdmin, and type zen_ as your Store Identifier (Table-prefix) and click “Save Database Settings” button.



After clicking “Save Database Settings” button, you will see a similar image like below.


Now, leave everything as it is and select “No” for the “Enable SSL” & “Enable SSL in Admin Area” just like below image. Note that, in real life you must purchase SSL certificates and select “YES” over here for these two fields. But for this example, I am selecting NO. Click “Save System Settings” button.


After clicking “Save System Settings” button, you will encounter an window like below. Set it up according to your requirements or you can follow mine over here which is valid for demonstrating this example only. Select “Yes” for Store Demo field and click “Save Store Settings” button.


Now, you will have a window like this. Enter your Administrator Username, TEMPORARY Admin Password and Confirm temporary Admin Password along with Administrator’s Email address. These informations will be required to access the Admin Panel of Zen Cart. Hit “Save Admin Settings” button.


This time, you will see a window like below image. This image indicates that we have successfully installed Zen Cart on our CentOS 7 Server. Yahoo!!!


We need to delete the installation folder of Zen Cart first and rename the admin folder as well. To do so, open a terminal and issue the below commands.

sudo cd /var/www/html/zencart
sudo rm -rf zc_install
sudo cp -avr admin adminmysite
sudo rm -rf admin

Now, type the following in your web browser address bar and you will see something like this.



To access the Zen Cart admin panel, type the following in the web browser address bar.


Enter “Admin” as Username and the temporary password that you entered earlier while setting up Zen Cart. After successful login, you need to change your temporary password. And then you will see something like this.


We are done with our today’s tutorial.

Thanks for reading. Hope this helps you.