How to install Zen Cart on CentOS 7 using LEMP

To Install Zen Cart on Ubuntu 19.04

irements for Zen Cart:

Apache

MySQL

PHP and its modules

php php-xml php-mysql php-mbstring php-zip php-soap php-curl php-gd php-ldap php-imap php-common php-dev libmcrypt-dev php-pear

Installation procedure

Check the Ubuntu version by using the following command.

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 19.04
Release:	19.04
Codename:	disco

Configure the MySQL database. Log into MySQL as a root user and make the necessary settings.

root@linuxhelp:~# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.26-0ubuntu0.19.04.1 (Ubuntu)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database zen;
Query OK, 1 row affected (0.00 sec)

mysql> create user 'zenuser'@localhost identified by 'Linuxc#45';
Query OK, 0 rows affected (0.00 sec)

mysql> grant all privileges on zen.* to 'zenuser'@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

Once the database configuration is done, download the Zen Cart Installation package by using the wget command.

root@linuxhelp:~# wget https://nchc.dl.sourceforge.net/project/zencart/CURRENT%20-%20Zen%20Cart%201.5.x%20Series/zen-cart-v1.5.6a-01042019.zip
--2019-05-21 01:44:30--  https://nchc.dl.sourceforge.net/project/zencart/CURRENT%20-%20Zen%20Cart%201.5.x%20Series/zen-cart-v1.5.6a-01042019.zip
Resolving nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)... 211.79.60.17, 2001:e10:ffff:1f02::17
Connecting to nchc.dl.sourceforge.net (nchc.dl.sourceforge.net)|211.79.60.17|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8923438 (8.5M) [application/octet-stream]
Saving to: ‘zen-cart-v1.5.6a-01042019.zip’

zen-cart-v1.5.6a-01042019.z 100%[==========================================>]   8.51M  1.12MB/s    in 8.9s    

2019-05-21 01:44:40 (980 KB/s) - ‘zen-cart-v1.5.6a-01042019.zip’ saved [8923438/8923438]

Once the download is completed extract the downloaded package using unzip command.

root@linuxhelp:~# unzip zen-cart-v1.5.6a-01042019.zip
Archive:  zen-cart-v1.5.6a-01042019.zip
   creating: zen-cart-v1.5.6a-01042019/
  inflating: zen-cart-v1.5.6a-01042019/README.md  
   creating: zen-cart-v1.5.6a-01042019/admin/
  inflating: zen-cart-v1.5.6a-01042019/admin/.htaccess  
  inflating: zen-cart-v1.5.6a-01042019/admin/admin_account.php  
  inflating: zen-cart-v1.5.6a-01042019/admin/admin_activity.php  
  inflating: zen-cart-v1.5.6a-01042019/admin/admin_page_registration.php  
  inflating: zen-cart-v1.5.6a-01042019/admin/ajax.php  
  inflating: zen-cart-v1.5.6a-01042019/admin/alert_page.php  
  inflating: zen-cart-v1.5.6a-01042019/admin/alt_nav.php  
.
.
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_138.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_139.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_150.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_151.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_152.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_153.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_154.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_155.sql  
  inflating: zen-cart-v1.5.6a-01042019/zc_install/sql/updates/mysql_upgrade_zencart_156.sql 

List out the details.

root@linuxhelp:~# ls
zen-cart-v1.5.6a-01042019  zen-cart-v1.5.6a-01042019.zip

Move the ZenCart directory to apache root directory.

root@linuxhelp:~# mv zen-cart-v1.5.6a-01042019 /var/www/zen

Set the ownership and permission for ZenCart by using the following command.

root@linuxhelp:~# chown -R www-data.www-data /var/www/zen

root@linuxhelp:~# chmod -R 755 /var/www/zen

Configure the virtualhost for accessing the Zen Cart.

root@linuxhelp:~# vim /etc/apache2/sites-available/zen.conf
<Virtualhost *:80>
        Servername www.linuxhelp1.com
        Documentroot /var/www/zen
<directory /var/www/zen>
allowoverride all
allow from all
</directory>
</Virtualhost>

Disable the default site access.

root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable the site access for accessing the Zen Cart.

root@linuxhelp:~# a2ensite zen.conf
Enabling site zen.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable the rewrite module.

root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Restart the apache service by using the following command.

root@linuxhelp:~# systemctl restart apache2

Open it is done, switch to your browser and enter the domain name.

Welcome page of Zen Cart.

Check the system inspection.

Accept the given license agreement and click continue.

Configure the database setting.

Create your admin credentials.

Go to the admin page before that delete the zc_install go back to the terminal.

Enter into the Zen Cart directory.

root@linuxhelp:~# cd /var/www/zen
root@linuxhelp:/var/www/zen# ls
ajax.php         editors      includes              logs                 pub                  zc_install
cache            email        index.php             mcs_learn_more.html  README.md
Danny-Ihn-cheEr  extras       install.txt           media                robots_example.txt
docs             favicon.ico  ipn_main_handler.php  nddbc.html           square_handler.php
download         images       license.txt           page_not_found.php   vbv_learn_more.html

Remove the zc install by using the following command.

root@linuxhelp:/var/www/zen# rm -rf zc_install

Enter your admin credentials to login Zen Cart.

Enter a new password for admin.

This is the dashboard of Zen Cart.

With this, the method to install Zen Cart on Ubuntu 19.04 comes to an end.

FAQ
Q
What is Zen Cart?
A
Zen Cart is an online store management system. It is PHP-based, using a MySQL database and HTML components. Zen Cart truly is free, user-friendly, open source shopping cart software. It contains features such as customization, integration with payment, works with any hosting company and can choose own domain name.
Q
How can I find out what version of Zen Cart or PHP or MySQL I'm using?
A
To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go to Admin->Tools->Server Info (or click "Version" on the top right navigation menu).
Q
Should I charge taxes? How much do I charge in Zencart?
A
You should consult your local tax authority for tax advice as it relates to your business. For professional assistance or "creative" strategies.
Q
How do I change or reset my Admin Password on Zencart?
A
To reset my Admin Password on Zencart please refer the link as follow "https://www.zen-cart.com/content.php?44-how-do-i-change-or-reset-my-admin-password-(i-lost-it)&s=269becd847d54fd4965471e6d2c40849"
Q
Where can I download the Zen Cart code?
A
You can download any of the Zen Cart original files (current version and older versions) by clicking on the "Home" link at the top of this page, and then clicking on the "Download Zen Cart".