How to setup and install LiteCart in Ubuntu
To Setup and Install LiteCart in Ubuntu
LiteCart is a free online catalog and cart platform. It is programmed in PHP using HTML and CSS. LiteCart has an elegant and simple admin panel. It is well knowm for its simplicity, lightweight and convenience. Installation and configuration of LiteCart in Ubuntu is explained.
To install LiteCart
Before installing the LiteCart, update the system by using the below command.
root@linuxhelp1:~# apt-get update
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Reading package lists... Done
Then install the Apache and MySQL server.
root@linuxhelp1:~# apt-get install apache2 mysql-server -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpango1.0-0 libpangox-1.0-0
Use ' sudo apt autoremove' to remove them.
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils libaio1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libevent-core-2.0-5
libhtml-template-perl liblua5.1-0 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom libipc-sharedcache-perl mailx tinyca
The following NEW packages will be installed:
apache2 apache2-bin apache2-data apache2-utils libaio1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
libevent-core-2.0-5 libhtml-template-perl liblua5.1-0 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server
mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 18 newly installed, 0 to remove and 221 not upgraded.
Need to get 19.6 MB of archives.
After this operation, 167 MB of additional disk space will be used.
.
.
.
Setting up mysql-client-core-5.7 (5.7.15-0ubuntu0.16.04.1) ...
Setting up mysql-client-5.7 (5.7.15-0ubuntu0.16.04.1) ...
Setting up mysql-server-core-5.7 (5.7.15-0ubuntu0.16.04.1) ...
Setting up mysql-server-5.7 (5.7.15-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Setting up libhtml-template-perl (2.95-2) ...
Setting up mysql-server (5.7.15-0ubuntu0.16.04.1) ...
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu6) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Set the password for the mysql
After setting the password, install PHP and its modules.
root@linuxhelp1:~# apt-get install php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-mysql php7.0-gd -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libpango1.0-0 libpangox-1.0-0
Use ' sudo apt autoremove' to remove them.
The following additional packages will be installed:
libmcrypt4 php-common php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline
Suggested packages:
php-pear libmcrypt-dev mcrypt
The following NEW packages will be installed:
libapache2-mod-php7.0 libmcrypt4 php-common php7.0 php7.0-cli php7.0-common php7.0-gd php7.0-json php7.0-mcrypt php7.0-mysql
php7.0-opcache php7.0-readline
0 upgraded, 12 newly installed, 0 to remove and 221 not upgraded.
Need to get 3,669 kB of archives.
After this operation, 14.8 MB of additional disk space will be used.
.
.
.
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php7.0
Setting up libmcrypt4 (2.5.8-3.3) ...
Setting up php7.0 (7.0.8-0ubuntu0.16.04.2) ...
Setting up php7.0-gd (7.0.8-0ubuntu0.16.04.2) ...
Creating config file /etc/php/7.0/mods-available/gd.ini with new version
Setting up php7.0-mcrypt (7.0.8-0ubuntu0.16.04.2) ...
Creating config file /etc/php/7.0/mods-available/mcrypt.ini with new version
Setting up php7.0-mysql (7.0.8-0ubuntu0.16.04.2) ...
Creating config file /etc/php/7.0/mods-available/mysqlnd.ini with new version
Creating config file /etc/php/7.0/mods-available/mysqli.ini with new version
Creating config file /etc/php/7.0/mods-available/pdo_mysql.ini with new version
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for libapache2-mod-php7.0 (7.0.8-0ubuntu0.16.04.2) ...
Now start and enable the MySQL service.
root@linuxhelp1:~# systemctl start mysql.service
root@linuxhelp1:~# systemctl enable mysql.service
Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql
Then check the status by executing the following command.
root@linuxhelp1:~# systemctl status mysql.service ? mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service enabled vendor preset: enabled) Active: active (running) since Tue 2016-10-04 05:24:26 IST 4min 13s ago Main PID: 7481 (mysqld) CGroup: /system.slice/mysql.service ??7481 /usr/sbin/mysqld Oct 04 05:24:25 linuxhelp1 systemd[1]: Starting MySQL Community Server... Oct 04 05:24:26 linuxhelp1 systemd[1]: Started MySQL Community Server. Oct 04 05:27:32 linuxhelp1 systemd[1]: Started MySQL Community Server.
Create a database and database user, grant all the permission to the user to access the database.
root@linuxhelp1:~# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with or g. Your MySQL connection id is 4 Server version: 5.7.15-0ubuntu0.16.04.1 (Ubuntu) Copyright (c) 2000, 2016, 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 litecart Query OK, 1 row affected (0.20 sec) mysql> grant all privileges on litecart.* to user1@localhost identified by ' linuxc' Query OK, 0 rows affected, 1 warning (0.29 sec) mysql> flush privileges Query OK, 0 rows affected (1.26 sec) mysql> exit Bye
Now create a directory for the LiteCart and navigate inside the directory.
root@linuxhelp1:~# mkdir /var/www/html/litecart
root@linuxhelp1:~# cd /var/www/html/litecart/
root@linuxhelp1:/var/www/html/litecart#
Open the browser, go to the official page of the LiteCart and download it.
Then move to the downloaded path and extract the package to the document root directory.
root@linuxhelp1:/var/www/html/litecart# cd /home/user1/Downloads/
root@linuxhelp1:~/Downloads# ls
litecart-1.3.6.zip
root@linuxhelp1:~/Downloads# unzip litecart-1.3.6.zip -d /var/www/html/litecart/
Archive: litecart-1.3.6.zip
inflating: /var/www/html/litecart/CREDITS.md
inflating: /var/www/html/litecart/LICENSE.md
inflating: /var/www/html/litecart/README.md
inflating: /var/www/html/litecart/STANDARD.md
inflating: /var/www/html/litecart/UPGRADE.md
creating: /var/www/html/litecart/art/
inflating: /var/www/html/litecart/art/cart.svg
.
.
.
creating: /var/www/html/litecart/public_html/vqmod/
inflating: /var/www/html/litecart/public_html/vqmod/.htaccess
extracting: /var/www/html/litecart/public_html/vqmod/checked.cache
extracting: /var/www/html/litecart/public_html/vqmod/index.html
extracting: /var/www/html/litecart/public_html/vqmod/mods.cache
inflating: /var/www/html/litecart/public_html/vqmod/readme.txt
creating: /var/www/html/litecart/public_html/vqmod/vqcache/
extracting: /var/www/html/litecart/public_html/vqmod/vqcache/index.html
inflating: /var/www/html/litecart/public_html/vqmod/vqmod.php
creating: /var/www/html/litecart/public_html/vqmod/xml/
extracting: /var/www/html/litecart/public_html/vqmod/xml/index.html
inflating: /var/www/html/litecart/.gitignore
Change the owner permission for that directory by executing the following command.
root@linuxhelp1:~/Downloads# chown www-data:www-data -R /var/www/html/litecart/
Open the apache configuration file and add the following code inside the file.
root@linuxhelp1:~/Downloads# vim /etc/apache2/sites-available/litecart.conf
ServerAdmin admin@linuxhelp1.com
DocumentRoot /var/www/html/litecart/
ServerName www.linuxhelp1.com
ServerAlias www.linuhxelp1.com
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
ErrorLog /var/log/apache2/linuxhelp1.com/error_log
CustomLog /var/log/apache2/linuxhelp1.com/access_log common
Create directory and the logs files that you have mentioned in your configuration file.
root@linuxhelp1:~/Downloads# mkdir /var/log/apache2/linuxhelp1
root@linuxhelp1:~/Downloads# touch /var/log/apache2/linuxhelp1/error_log
root@linuxhelp1:~/Downloads# touch /var/log/apache2/linuxhelp1/access_log
Open the below URL in your favorite browser,
http://< your_domain> /litecart/public_html
Fill the details of your database and admin credentials
Now click install now to start installation
Now the install is completed
Click on administration area to get the login screen
Now you can be able to see the litecart
# apt-get install php7.0 libapache2-mod-php7.0 php7.0-mcrypt php7.0-mysql php7.0-gd -y
# systemctl start mysql.service
# systemctl enable mysql.service
1.update the system
2. Then install the Apache and MySQL server
3.Set the password for the MySQL
4. After setting the password, install PHP and its modules
5. Now start and enable the MySQL service and Create a database and database user, grant all the permission to the user to access the database
6. Now create a directory for the LiteCart and navigate inside the directory
7. Then move to the downloaded path and extract the package to the document root directory
8. Change the owner permission for that directory
These steps are followed by the installation of LiteCart
On a new line, add the IP address of the host machine (the machine running WAMP), followed by the ServerName for the vhost (ie: johndugan.local).