0

LiteCart is a e-commerce that is free built with PHP, jQuery and HTML5.

Several features of LiteCart:

  • Simple user interface
  • High performance
  • One step checkout
  • Search engine and mobile friendly
  • Support add-ons
  • Unlimited categories and products
  • ISO-codes
  • Multiple charset support

You can learn more about LiteCart by visiting the LiteCart Website. You can also see how LiteCart compared to another software that is e-commerce

Objective

In this guide we will discover install that is how-to on Ubuntu 14.04. We shall additionally install and configure its prerequisites

Prerequisites

We will install LiteCart in fresh installing Ubuntu Server 14.04. We likewise require these application to run LiteCart:

  • Apache 2
  • MySQL 5.5+
  • PHP 5.3+

Update Base System

Before we install LiteCart, let us upgrade the device towards update that is latest.

$ Sudo apt-get update $ sudo apt-get -y upgrade 

Install Apache 2

After applying update that is latest to your base system, Lets’s begin putting in Apache 2 and needed libraries.

$ sudo apt-get -y install apache2 apache2-bin apache2-data apache2-mpm-prefork libaio1 libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient18 libterm-readkey-perl libwrap0 ssl-cert tcpd 

We can check always Apache 2 solution status utilizing demand below:

sudo solution apache2 status  * apache2 is operating 

We also can check always whether Apache 2 is paying attention where slot utilizing demand below:

 sudo netstat -naptu | grep apache tcp6       0      0 :::80                   :::*                    LISTEN      14873/apache2 

Install MySQL 5.6

We will install and make use of MySQL 5.6 as database for LiteCart.

We use MySQL Server 5.6 since MySQL 5.6 is considered the most updated form of MySQL shipped with Ubuntu 14.04 Trusty Tahr.

$ sudo apt-get install that is-y 

We need to setup MySQL root password. Please input password for MySQL root user.

Just how to Install LiteCart on Ubuntu 14.04 10

Verify root password.

Just how to Install LiteCart on Ubuntu 14.04 11

Securing MySQL Installation.

We will secure MySQL installation by running mysql_secure_installation.

Enter root password it, we’ll need the current password for the root user that we set on installation:

$ mysql_secure_installation  NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL       SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure. If you have simply set up MySQL, along withn't set the basis password yet, the password will likely to be blank, so that you should simply press enter right here.

Enter present password for root (enter for none): okay, effectively utilized password, moving forward...

Since we have root password set, solution this spend the n:

Setting the basis password helps to ensure that no body can log in to the MySQL root individual with no authorisation that is proper

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] n ... skipping.

Remove the user that is anonymous enhance safety. This can make certain individuals or applications have actually a username that is correct password to login to MySQL. Answer with Y

By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them.  This is intended only for testing, and to make the installation go a bit smoother.  They should be removed by you before stepping into a production environment.

Remove anonymous users? [Y/n] Y ... Success!

We would also like eliminate root login from remote device. Response with Y.

Normally, root should simply be permitted to link from 'localhost'.  This helps to ensure that some body cannot imagine within root password from community.

Disallow root login from another location? [Y/n] Y ... Success!

Previously the test database produced immediately by MySQL installation, but MySQL 5.6 cannot produce a test database. We are able to nevertheless select Y, it’ll toss mistake but that is fine.

By standard, MySQL includes a database known as 'test' that anybody can access.  This will be additionally meant limited to evaluation, and may be eliminated before stepping into a production environment.

Remove Test access and database to it? [Y/n] Y - Dropping test database... ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist ... Failed! Not critical, keep moving... - Removing privileges on test database... ... Success!

The last step is to reload MySQL privilege table.

Reloading the privilege tables will ensure that all changes made so far will take effect immediately.

Reload privilege tables now? [Y/n] Y ... Success!

All done! If you've completed all of the above steps, your installation that is mySQL should be protected.

Thanks for making use of MySQL!

Cleaning up...

Create a Database for litecart

Now we’ve a secure MySQL installation, it is time to produce database and individual for litecart it self.

Login to MySQL utilizing the root qualifications.

$ Mysql root that is-u Enter password:  Welcome to the MySQL monitor.  Commands end with ; or g. Your MySQL connection id is 58 Server version: 5.6.30-0ubuntu0.14.04.1 (Ubuntu)

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

Oracle is a trademark that is registered of Corporation and/or its affiliates. Other names might trademarks of these particular owners.

Type 'help;' or 'h' for assistance. Type 'c' to clear the present input declaration.

mysql>

Create brand new database known as litecart utilizing demand below:

mysql> CREATE DATABASE litecart CHARACTER SET utf8 COLLATE utf8_general_ci; Query okay, 1 line impacted (0.00 sec) 

Create a person for litecart

The database for litecart is prepared, let us produce a username and password and give privileges to litecart database.

Don’t forget to improve the password litecart123secret below with better password.

mysql> GIVE each PRIVILEGES ON `litecart`.* TO 'litecart'@'localhost' IDENTIFIED with 'litecart123secret'; Query okay, 0 rows impacted (0.00 sec) 

We should run FLUSH PRIVILEGES demand so your privileges dining table will likely to be reloaded by MySQL so we may use brand new credential.

mysql> FLUSH PRIVILEGES; Query okay, 0 rows impacted (0.00 sec) 

Exit from MySQL system by typing q.

mysql> q 

Install PHP 5

The final component before we can install litecart is PHP 5. We will install PHP 5 and several common PHP libraries.

$ that we have to install sudo apt-get install that is-y php5-common php5-json php5-mysql php5-readline 

Install extra php libraries:

$ sudo apt-get -y install php5-gd 

Restart Apache 2 procedure so that the modifications will likely to be used:

$ sudo solution apache2 restart 

Install litecart

All prerequisites seem to be set up. We are willing to install litecart. The newest stable form of litecart can be obtained LiteCart down load web page.

At the full time with this writing, the newest stable variation is version 1.2.9, let us down load litecart compressed file utilizing wget.

$ wget -c "https://www.litecart.net/downloading?version=2.0&action=get" -O litecart-2.0.zip 

Extract the file that is downloaded unzip. If your system don’t have unzip yet, you can install unzip using command below:

$ sudo apt-get -y install unzip 

Extract litecart using unzip:

$ unzip litecart-2.0.zip -d litecar 

Move litecart directory to Apache directory.

$ sudo mv litecart /var/www 

Change ownership of the litecart directory to the www-data user and group.

$ sudo chown -R www-data:www-data /var/www/litecart 

The LiteCart files are ready, now let’s create a Apache Virtual Host configuration to serve litecart.

Configure Apache Virtual Host for http Only

Create new apache configuration file on /etc/apache2/sites-available/litecart.conf with contents below.

<VirtualHost *:80>     ServerName litecart.exampleserver.xyz

DocumentRoot /var/www/litecart/public_html

<Directory /var/www/litecart/public_html> Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory>

ErrorLog ${APACHE_LOG_DIR}/litecart.exampleserver.xyz-error.log CustomLog ${APACHE_LOG_DIR}/litecart.exampleserver.xyz-access.log combined

</VirtualHost>

Don’t forget to change litecart.exampleserver.xyz above with the domain name that you use for your litecart installation.

Enable the site using a2ensite command.

$ sudo a2ensite litecart 

We need to enable mod_headers since LiteCart require this module to be enabled.

$ sudo a2enmod headers 

Restart apache2 process so it read the new virtualhost configuration and reload modules.

$ sudo service apache2 restart 

LiteCart Setup Wizard

Open your LiteCart URL and you will be redirected to LiteCart installer. LiteCart only have a one page installer with multiple sections.

The first section is system requirements check, we should already have passed all requirements by now.

Just how to Install LiteCart on Ubuntu 14.04 12

The next section is file and directory permission check. We should also get all********)( that is OK.(*******)Next is installation parameters. We are able to enter database title and qualifications that individuals made before.

We must also determine shop information like title, e-mail, nation and TimeZone

Just how to Install LiteCart on Ubuntu 14.04 13

Last area should determine management folder and qualifications. Simply click Install Now.

Just how to Install LiteCart on Ubuntu 14.04 14

We gets caution that tables that are existing be overwritten. Click Ok

Just how to Install LiteCart on Ubuntu 14.04 15

Installation is complete we can click link to Administration area.

Just how to Install LiteCart on Ubuntu 14.04 16

We can login using admin credential we created on installation wizard.

Just how to Install LiteCart on Ubuntu 14.04 17

Login once again with the admin that is same.

Just how to Install LiteCart on Ubuntu 14.04 18

Now we have LiteCart management dashboard.

Just how to Install LiteCart on Ubuntu 14.04 19

We can check out our LiteCart website to see our brand new website. Just how to Install LiteCart on Ubuntu 14.04 20

Secure installation

To secure our LiteCart installation we must eliminate install directory.

$ rm -rf /var/www/litecart/public_html/install 

Configure https just website for litecart

Secure connection has become a requirement for internet application. Final action that individuals does inside tutorial is changing the text to just utilize https.

We assume you have SSL certificate and key that is private

Let’s create new apache virtual host configuration on /etc/apache2/sites-available/litecart-ssl.conf with contents below.

Don’t forget to change*********) that are:

(**********)ServerName

  • SSLCertificateFile
  • SSLCertificateChainFile
  • SSLCertificateKeyFile
  • <VirtualHost *:80>    ServerName litecart.exampleserver.xyz    Redirect permanent / https://litecart.exampleserver.xyz/ </VirtualHost>

    <VirtualHost *:443>

    ServerName litecart.exampleserver.xyz

    DocumentRoot /var/www/litecart/public_html

    <Directory /var/www/litecart/public_html> choices -Indexes +FollowSymLinks +MultiViews AllowOverride All need all provided </Directory>

    ErrorLog ${APACHE_LOG_DIR}/litecart.exampleserver.xyz-error.log CustomLog ${APACHE_LOG_DIR}/litecart.exampleserver.xyz-access.log combined

    SSLEngine on SSLCertificateFile /etc/apache2/ssl/litecart.exampleserver.xyz.crt SSLCertificateChainFile /etc/apache2/ssl/litecart.exampleserver.xyz.crt SSLCertificateKeyFile /etc/apache2/ssl/litecart.exampleserver.xyz.key

    Header constantly set Strict-Transport-Security "max-age=15768000"

    </VirtualHost>

    # intermediate setup, tweak towards requirements SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS SSLHonorCipherOrder on

    We also disable litecart http just digital host and allow the newest digital host config.

    $ sudo a2dissite litecart $ sudo a2ensite litecart-ssl 

    The brand new host that is virtual need Apache mod_ssl module. We need to enable this module.

    $ Sudo ssl that is a2enmod*****************)

    Now, restart the Apache 2 solution therefore it will reload its setup. We have to restart in place of reload since we allow brand new module.

    $ sudo solution apache2 restart 

    Extending Litecart

    You can check out LiteCart Addons web page to obtain additional addons to increase LiteCart.

    Summary

    In this guide we discovered how-to litecart that is install Ubuntu 14.04.

    We installed all the prerequisites, create user and database on MySQL for LiteCart and also configure Apache 2 virtual hosts to be able to serve litecart.

    We also configure https settings for litecart so we run LiteCart securely, this increases peoples confidence transactions that are doing our e-store.

    Install Nginx, Setup Lets Encrypt SSL and Setup HTTP/2 on Ubuntu 15.10 Server

    Previous article

    Keeping qualifications individually with Object space in Django

    Next article

    You may also like

    Comments

    Leave a Reply

    More in Apache