How to Install CubeCart on Ubuntu 19.04

To install CubeCart on Ubuntu 19.04

Requirements for CubeCart:

Apache

MySQL

PHP and Its modules

(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)

Installation procedure

Check the Ubuntu version by using the following command

root@linuxhelp:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 19.04
Release:	19.04
Codename:	disco

Configure the MySQL database. Log into MySQL as a root user and make the necessary settings.

root@linuxhelp:~# 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.26-0ubuntu0.19.04.1 (Ubuntu)

Copyright (c) 2000, 2019, 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 cubedb;
Query OK, 1 row affected (0.04 sec)

mysql> create user 'cubeuser'@localhost identified by 'Linuxc#45';
Query OK, 0 rows affected (0.06 sec)

mysql> grant all privileges on cubedb.* to 'cubeuser'@localhost;
Query OK, 0 rows affected (0.02 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.12 sec)

mysql> exit
Bye

Once the database configuration is done, download the CubeCart installation package by using the wget command.

root@linuxhelp:~# wget https://www.cubecart.com/download/CubeCart-6.2.5.zip
--2019-05-23 03:45:15--  https://www.cubecart.com/download/CubeCart-6.2.5.zip
Resolving www.cubecart.com (www.cubecart.com)... 104.27.174.104, 104.27.175.104, 2606:4700:30::681b:af68, ...
Connecting to www.cubecart.com (www.cubecart.com)|104.27.174.104|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘CubeCart-6.2.5.zip’

CubeCart-6.2.5.zip              [                           <=>             ]   6.30M  1.12MB/s    in 5.9s    

2019-05-23 03:45:22 (1.07 MB/s) - ‘CubeCart-6.2.5.zip’ saved [6608723]

Once the download is completed extract the downloaded package using unzip command.

root@linuxhelp:~# unzip CubeCart-6.2.5.zip -d cube
Archive:  CubeCart-6.2.5.zip
   creating: cube/admin/
  inflating: cube/admin/index.php    
   creating: cube/admin/skins/
   creating: cube/admin/skins/default/
   creating: cube/admin/skins/default/images/
 extracting: cube/admin/skins/default/images/add.png  
  inflating: cube/admin/skins/default/images/page_generic.png  
  inflating: cube/admin/skins/default/images/sort_asc_on.png  
  inflating: cube/admin/skins/default/images/sort_desc_on.png  
.
.
  inflating: cube/skins/foundation/templates/content.checkout.confirm.php  
  inflating: cube/skins/foundation/templates/content.orders.php  
  inflating: cube/skins/foundation/templates/content.recover.php  
  inflating: cube/skins/foundation/templates/element.css.php  
 extracting: cube/skins/foundation/templates/.htaccess  
  inflating: cube/skins/foundation/templates/content.product.php

Move the CubeCart directory to apache root directory.

root@linuxhelp:~# mv cube /var/www/

Set the ownership and permission for Cube Cart by using the following command.

root@linuxhelp:~# chown -R www-data.www-data /var/www/cube

root@linuxhelp:~# chmod -R 755 /var/www/cube

Configure the virtualhost for accessing the CubeCart.

root@linuxhelp:~# vim /etc/apache2/sites-available/cube.conf
<Virtualhost *:80>
        Servername www.linuxhelp1.com
        Documentroot /var/www/cube
<directory /var/www/cube>
allowoverride all
allow from all
</directory>
</Virtualhost>

Disable the default site access.

root@linuxhelp:~# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable the site access for accessing the CubeCart.

root@linuxhelp:~# a2ensite cube.conf
Enabling site cube.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable the rewrite module.

root@linuxhelp:~# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Restart the apache service by using the following command.

root@linuxhelp:~# systemctl restart apache2

Switch to your browser and enter the domain name Verify whether all the pre-requirements are met and click on continue to proceed Now as you can see you cubecart is being installed on the server. Next, you need to accept the license agreement. Just verify that file permission and click on continue. Need to configure the database setup Configure the language setup Configure the admin credentials After the installation completed you will see the following page After the installation, you can log in using the admin user credentials to access the cubecart. This is the dashboard of cube cart

With this, the method to install Cubecart On Ubuntu 19.04 comes to an end.

FAQ
Q
How to configure the host entry for cube cart?
A
Enter into #vim /etc/hosts

Q
What are the required PHP modules for CubeCart?
A
The following are the required PHP modules

php libapache2-mod-phpphp-mcrypt php-mysql php-gd php-xml php-mbstring php-curl
Q
While calling in the browser. Does it open the default apache page for CubeCart?
A
Check the document root specified in the virtual host.
Q
While accessing CubeCart in web interface results in a blank page, How to resolve this?
A
In CubeCart, check for php and php modules are installed properly and also look into the apache error logs.
Q
What is CubeCart?
A
CubeCart is an open source e-commerce shopping cart software used for Linux distributions. It allows users to set up their own online stores to sell digital or physical products all over the world.