How to: Install Zen Cart on a LAMP server - gHacks Tech News

How to: Install Zen Cart on a LAMP server

If you have ever had a need for an on-line shopping cart, and have ever tried to install a shopping cart, you know that making a choice can be a challenge, and getting the shop up and running can be a challenge.

Not so much with Zen Cart. Zen Cart is an open source e-commerce solution that serves as a stand-alone shopping cart and is installed on top of a LAMP server. If you're not sure how to install a LAMP server check out my article "How to: Install a LAMP server." With that LAMP server up and running you are ready to install Zen Cart.

The installation of Zen Cart will require you to use a few Linux commands: zip, mv, and chmod. But that is it. For the purposes of this article I will assume you are using phpmyadmin for the database creation. If you need help installing phpmyadmin check out my article "Install phpmyadmin for easy MySQL administration."

With all of that in mind, let's begin the installation.

Getting Zen Cart

The first thing you need to do is download Zen Cart. But don't just open your browser to the download page. Instead ssh to the server that will house Zen Cart, cd to the server document root, and use wget to download the necessary file into the correct directory. The command to download Zen Cart is:

sudo wget "http://downloads.sourceforge.net/project/zencart/CURRENT_ Zen Cart 1.3.x Series/Zen Cart v1.3.8 - Full Release/zen-cart-v1.3.8a-full-fileset-12112007.zip"

NOTE: Since there are space in the path name you do have to make use of the "" when using wget to download the file.

With the file downloaded and in place it is time to unzip the file. To unzip the Zen Cart file issue this command:

sudo unzip zen-cart-v1.3.8a-full-fileset-12112007.zip

which will create the directory zen-cart-v1.3.8a-full-fileset-12112007. To make your life easier you will want to change the name of that directory to a much easier name. This directory is what you (and your customers) will use to access your shopping cart, so make it easy. I rename mine zencart or shopping. Rename this to suit your needs. Rename it with the command:

sudo mv zen-cart-v1.3.8a-full-fileset-12112007 zencart

Now it's time to create the configuration file and make some changes to permissions.

Configuration files and permissions

Zen Cart does not unpack with the necessary configuration files in place. What you have to do is rename to files so they will serve as your configuration files. To do this issue the following commands (from within your Zen Cart directory):

sudo mv includes/dist-configure.php includes/configure.php

and

sudo mv admin/includes/dist-configure.php admin/includes/configure.php

The next step is to change the permissions of the configuration files like so:

sudo chmod 777 includes/configure.php

and

sudo chmod 777 admin/includes/configure.php

The configuration files are set. Time to change permissions of some directories.

Below are all of the commands you need to run to set the correct permissions for your installation:

sudo chmod 777 cache
sudo chmod 777 includes/languages/english/html_includes
sudo chmod 777 media
sudo chmod 777 pub
sudo chmod 777 admin/backups
sudo chmod 777 admin/images/graphs

With this complete you are now ready to create your database and log into the web-based installer and install Zen Cart.

Installing via web

After you create your database (using phpmyadmin) log into the Zen Cart install like so:

http://IP_TO_SERVER/ZENCART/zc_install

Where IP_TO_SERVER is the actual IP address of your server and ZENCART is the name you have given your Zen Cart directory.

The web-based installation is very simple. You will only have to insert options like the MySQL user and password, name of site, administrator name/email, etc. Outside of some very easy questions, Zen Cart will most likely correctly guess all of the details of your installation.

After you have stepped through the installation wizard your Zen Cart installation is done. You will be directed to either immediately administer the site or view the site.

Final thoughts

Zen Cart is one of the better shopping cart systems available from the open source community. It is easy to install/administer, robust, feature-rich, and reliable. If you have a need for ecommerce make sure you check out Zen Cart first.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. dev said on April 12, 2010 at 3:28 pm
      Reply

      Not successfulkll.
      1) Probably zencart dir need to be moved in /var/www
      2) I did that also but nothing comes just the blank screen ..

      1. C Sanders said on August 20, 2014 at 4:52 pm
        Reply

        Nothing but a blank screen. “DIR_FS_CATALOG” setting problem apparently. No information on zen’s site.

        the install doc is as vacuous as the resulting blank page. Useless.

        I last installed this for a client three or four years ago with no problems whatsoever. Easy to use and configure. v153 is a bad joke.

    2. MBT said on May 3, 2010 at 11:24 am
      Reply

      the dir is /usr/….

      From: mbtselling.com

    3. zencart said on September 4, 2010 at 7:09 pm
      Reply

      thanks for you sharing

    4. flameash said on December 3, 2010 at 7:40 am
      Reply

      thx a lot for sharing.

      i tried sudo wget “http://sourceforge.net/projects/zencart/files/CURRENT_%20Zen%20Cart%201.3.x%20Series/Zen%20Cart%20v1.3.9%20-%20Full%20Release/zen-cart-v1.3.9h-full-fileset-10262010.zip/download”
      wat not working.

      could you help out

    Leave a Reply