How to install LiteCart on Debian 12
To Install LiteCart On Debian 12
Introduction:
LiteCart's on-demand design framework makes the platform super fast! Once you access a node, LiteCart will automatically load only the necessary php files into the system. The system nodes are static classes. They are accessed by simply typing nodename::method() or nodename::$variable.
Installation Procedure:
Step 1: Check the OS version by using the below command.
root@linuxhelp:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Step 2: Install the required packages and modules by using the below command.
root@linuxhelp:~# apt install php php-xml php-mysql php-mbstring php-zip php-soap php-curl php-gd php-ldap php-imap php-common php-dev libmcrypt-dev php-pear apache2 mariadb-server -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
mariadb-server is already the newest version (1:10.11.4-1~deb12u1).
The following packages were automatically installed and are no longer required:
libc-ares2 libgrpc++1.51 libgrpc29 libprotoc32 libre2-9
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
apache2-bin apache2-data apache2-utils autopoint debhelper dh-autoreconf
dh-strip-nondeterminism dwz gettext intltool-debian libapache2-mod-php8.2
libarchive-cpio-perl libarchive-zip-perl libdebhelper-perl
libfile-stripnondeterminism-perl libmail-sendmail-perl libmcrypt4
libsub-override-perl libsys-hostname-long-perl libzip4 php8.2 php8.2-cli
php8.2-common php8.2-curl php8.2-dev php8.2-gd php8.2-imap php8.2-ldap
php8.2-mbstring php8.2-mysql php8.2-opcache php8.2-readline php8.2-soap php8.2-xml
php8.2-zip pkg-php-tools po-debconf shtool
Suggested packages:
apache2-doc apache2-suexec-pristine | apache2-suexec-custom dh-make gettext-doc
libasprintf-dev libgettextpo-dev mcrypt dh-php libmail-box-perl
Setting up debhelper (13.11.4) ...
Setting up php8.2 (8.2.18-1~deb12u1) ...
Setting up pkg-php-tools (1.44) ...
Setting up php (2:8.2+93) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u3) ...
Processing triggers for php8.2-cli (8.2.18-1~deb12u1) ...
Processing triggers for libapache2-mod-php8.2 (8.2.18-1~deb12u1) ...
Step 3: Login to the MySQL by using the below command.
root@linuxhelp:~# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 60
Server version: 10.11.4-MariaDB-1~deb12u1 Debian 12
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
Step 4: Create Database by using the below command.
MariaDB [(none)]> create database litedb;
Query OK, 1 row affected (0.001 sec)
Step 5: Create MySQL user by using the below command.
MariaDB [(none)]> create user 'liteuser'@'localhost' identified by 'Admin@123';
Query OK, 0 rows affected (0.042 sec)
Step 6: Grant privileges to the user by using the below command.
MariaDB [(none)]> grant all privileges on litedb.* to 'liteuser'@'localhost';
Query OK, 0 rows affected (0.001 sec)
Step 7: Refresh the privileges by using the below command.
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)
Step 8: exit the MySQL console by using the below command.
MariaDB [(none)]> exit
Bye
Step 9: Download the LiteCart zip file by using the below command.
root@linuxhelp:~# wget https://github.com/litecart/litecart/archive/master.zip
--2024-04-26 03:04:57-- https://github.com/litecart/litecart/archive/master.zip
Resolving github.com (github.com)... 20.207.73.82
Connecting to github.com (github.com)|20.207.73.82|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/litecart/litecart/zip/refs/heads/master [following]
--2024-04-26 03:04:57-- https://codeload.github.com/litecart/litecart/zip/refs/heads/master
Resolving codeload.github.com (codeload.github.com)... 20.207.73.88
Connecting to codeload.github.com (codeload.github.com)|20.207.73.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘master.zip’
master.zip [ <=> ] 1.43M 1.73MB/s in 0.8s
2024-04-26 03:04:58 (1.73 MB/s) - ‘master.zip’ saved [1503814]
Step 10: Extract the zip file by using the below command.
root@linuxhelp:~# unzip master.zip
Archive: master.zip
8ee6b435b34868b0c1a149e3996fdc836c97788c
creating: litecart-master/
inflating: litecart-master/.editorconfig
creating: litecart-master/.git-hooks/
inflating: litecart-master/.git-hooks/README.md
inflating: litecart-master/.git-hooks/pre-commit
creating: litecart-master/.git-hooks/pre-commit.d/
inflating: litecart-master/.git-hooks/pre-commit.d/calculate_checksums.php
inflating: litecart-master/.git-hooks/pre-commit.d/php_lint_checker.php
inflating: litecart-master/.git-hooks/pre-commit.d/trim_trailing_whitespace.sh
creating: litecart-master/.github/
creating: litecart-master/.github/ISSUE_TEMPLATE/
inflating: litecart-master/public_html/pages/regional_settings.inc.php
inflating: litecart-master/public_html/pages/reset_password.inc.php
inflating: litecart-master/public_html/pages/search.inc.php
creating: litecart-master/public_html/vmods/
creating: litecart-master/public_html/vmods/.cache/
extracting: litecart-master/public_html/vmods/.cache/index.html
inflating: litecart-master/public_html/vmods/.htaccess
extracting: litecart-master/public_html/vmods/index.html
Step 11: Move the directory to Apache document root location by using the below command.
root@linuxhelp:~# mv litecart-master /var/www/lite
Step 12: Make the ownership by using the below command.
root@linuxhelp:~# chown -R www-data:www-data /var/www/lite
Step 13: Make permission by using the below command.
root@linuxhelp:~# chmod -R 755 /var/www/lite
Step 14: Make the virtual host by using the below command.
root@linuxhelp:~# vim /etc/apache2/sites-available/lite.conf
<Virtualhost *:80>
Servername www.linuxhelp1.com
documentroot /var/www/lite
<directory /var/www/lite>
allowoverride all
allow from all
</directory>
</virtualhost>
Step 15: Disable the default virtual host by using the below command.
root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
systemctl reload apache2
Step 16: Enable the virtual host by using the below command.
root@linuxhelp:~# a2ensite lite.conf
Enabling site lite.
To activate the new configuration, you need to run:
systemctl reload apache2
Step 17: Enable the rewrite module by using the below command.
root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
systemctl restart apache2
Step 18: Restart the Apache web browser by using the below command.
root@linuxhelp:~# systemctl restart apache2
Step 19: Goto the browser and search the domain as shown in below image.
Step 20: Fill up the Details and enable terms and conditions and click Install as shown in below image.
Step 21: Now the LiteCart installation process completed.
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to install LiteCart on Debian 12. Your feedback is much welcome.