LiteCart is a free and open source shopping cart platform written in PHP, jQuery, and HTML 5. It is a simple, lightweight, and easy to use e-commerce software platform. LiteCart is quite fast compared to other shopping cart solutions and offers a user-friendly admin panel.
Here, we will learn how to install LiteCart on an Ubuntu 16.04 server.
- A newly deployed Vultr Ubuntu 16.04 server instance.
- A non-root user with sudo privileges setup on your server.
- A static IP address 192.168.15.110 configured on your system.
Step 1: Update the System
First, update your system to the latest stable version by running the following command:
sudo apt-get update -y sudo apt-get upgrade -y sudo reboot
Step 2: Installing LEMP Stack
First, you will need to install Apache, MariaDB, PHP 7 and other required PHP modules on your server. You can install all of them by running the following command:
sudo apt-get install apache2 mariadb-server php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-mysql php7.0-gd -y
Once the installation is complete, start MariaDB and Apache services. Also configure these services to start at boot time.
sudo systemctl start mysql sudo systemctl start apache2 sudo systemctl enable mysql sudo systemctl enable apache2
Step 3: Configuring MariaDB for LiteCart
By default, the MariaDB installation is not secure. You will need to secure it before continuing. Run the following script:
Answer all of the questions as shown below:
Enter current password for root (enter for none): Enter Set root password? [Y/n]: Y New password: <your-password> Re-enter new password: <your-password> Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Once the MariaDB installation has been secured, you will need to create a database for LiteCart.
First, login to the MySQL shell with the following command:
mysql -u root -p
Enter your root password to login. Then create a database for LiteCart with the following command:
MariaDB [(none)]> create database litecartdb; MariaDB [(none)]> grant all privileges on litecartdb.* to [email protected] identified by 'yourpassword'; MariaDB [(none)]> flush privileges; MariaDB [(none)]> exit;
Step 4: Installing LiteCart
You can download the latest stable version of the LiteCart from the offical site. Once the download has completed, extract the downloaded zip file to the Apache web root directory.
cd ~/Downloads unzip -d litecart-1.7.3.zip /var/www/html/
Next, change the ownership and permission of the Apache web root directory:
sudo chown -R www-data:www-data /var/www/html sudo chmod -R 755 /var/www/html
Step 5: Configuring Apache for LiteCart
You will need to create an Apache virtual host directive for LiteCart. Open the virtual host file:
sudo nano /etc/apache2/sites-available/litecart.conf
Add the following lines:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/litecart/ ServerName 192.168.15.110 Options FollowSymLinks AllowOverride All Order allow,deny allow from all ErrorLog /var/log/apache2/litecart_error_log CustomLog /var/log/apache2/litecart_access_log common </VirtualHost>
Save and close the file. Then enable the virtual host with the following command:
sudo a2ensite litecart.conf
Finally, restart the Apache service:
sudo systemctl restart apache2
Step 6: Accessing LiteCart web installation wizard
It’s time to access LiteCart’s web installation wizard.
Open your web browser and navigate to
http://192.168.15.110. Populate the install fields with the details shown below.
- Database Type : MySQL
- Hostname : localhost
- Database : litecartdb
- Username : lcuser
- Password : yourpassword
Table Prefix : lc_
Store Name : New Store
- Store Email : [email protected]
- Country : India
Time Zone : Asia/Kolkata
Folder Name : admin
- Username : admin
- Password : [email protected]
Once you are done, click the
Install Now button.
After the installation finishes, log into the LiteCart web interface with username
admin and the password
Congratulations! You have successfully installed LiteCart on your Ubuntu 16.04 server.
Want to contribute?
You could earn up to $300 by adding new articles
Suggest an update
Request an article
Leave a Reply