X

How to Install LiteCart on Ubuntu 16.04

Spread the love

Today we’ll show you, how to install LiteCart on Ubuntu 16.04. LiteCart is a free and open source e-commerce platform which is developed in PHP, jQuery and HTML 5. In this tutorial, we will show how to install LiteCart on Ubuntu 16.04 VPS and setup a LAMP stack (Linux, Apache, MySQL, PHP) if you already haven’t. Installing LiteCart on Ubuntu 16.04 is fairly easy task and should take less than 15 minutes.

1. Getting Started

First, you will need to login to your server via SSH as user root:

ssh root@IP_ADDRESS -p PORT_NUMBER

and replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.

Once logged in, let’s make sure that your Ubuntu 16.04 server is up-to-date by running the following commands:

apt-get update
apt-get upgrade

2. Install Apache Web Server

To install the Apache web server, run the following command:

apt-get install apache2

After the installation is completed, you can enable the service to be started automatically upon system boot with:

systemctl enable apache2

To verify that the Apache server is running, you can run the following command:

systemctl status apache2

3. Install PHP 7.0

Next, let’s install PHP 7 with some additional PHP modules:

apt-get install php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-gd php7.0-mcrypt php7.0-intl php7.0-curl php7.0-zip

4. Install MySQL Database Server

The next step is to install the MySQL database server. To do this, run the following command:

apt-get install mysql-server

After the installation is completed, you can start the database server and enable it to automatically start upon boot, with:

systemctl start mysql
systemctl enable mysql

You can also run the mysql_secure_installation script to harden the security of your MySQL database server:

mysql_secure_installation

After you have answered all the questions you can now go ahead and login to MySQL as root using your root password, with the following command:

mysql -u root -p

To create a new database for your LiteCart installation, run the following commands:

CREATE DATABASE litecart_db;
GRANT ALL PRIVILEGES ON litecart_db.* TO 'litecart_user'@'localhost' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
exit;

Make sure to replace “PASSWORD” with an actual, strong password.

5. Install LiteCart on Ubuntu 16.04

Now that our LAMP server is ready, we can finally install LiteCart.

First, let’s create a new directory for our LiteCart installation inside the Apache document root directory on your server:

mkdir /var/www/html/litecart

Next, download the latest LiteCart version from the official site and place it inside the newly created directory. Then you can extract the downloaded zip archive with the following command:

unzip litecart-2.0.2.zip

Change the ownership of the litecart directory:

chown -R www-data:www-data /var/www/html/litecart

6. Set up Apache Virtual Host

If you want to access your LiteCart installation using your own domain name, you will also need to create an Apache virtual host file:

nano /etc/apache2/sites-available/litecart.conf

And enter the following content inside this file:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/litecart
ServerName yourdomain.com
ServerAlias www.yourdomain.com

<Directory /var/www/html/litecart>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

ErrorLog /var/log/apache2/litecart-error_log
CustomLog /var/log/apache2/litecart-access_log common
</VirtualHost>

7. Enable the Virtual Host File

Enable the virtual host file with:

ln -s /etc/apache2/sites-available/litecart.conf /etc/apache2/sites-enabled/litecart.conf

8. Restart Apache

Restart your Apache with:

systemctl restart apache2

9. Complete the LiteCart Installation via Web Browser

That’s it. You can now go to http://yourdomain.com (or http://YOUR_IP_ADDRESS) and follow the on-screen instructions to complete the LiteCart installation.

 

Of course, you don’t have to install LiteCart on Ubuntu 16.04, if you use one of our outsourced Linux server support, in which case you can simply ask our expert Linux admins to install LiteCart on Ubuntu 16.04, for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install LiteCart on Ubuntu 16.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

Categories: Tutorials
admin:
Related Post