CubeCart is a powerful e-commerce shopping cart software solution which has been made to run on servers that have PHP & MySQL support. With CubeCart you can setup an online store which can be used to sell digital or physical products to customers all over the world. In this guide we will explain how to install CubeCart on an Ubuntu 14.04 VPS.
At the time of writing this tutorial, CubeCart 6.0.8 is the latest stable version available and it requires:
– Apache web server.
– PHP (version 5.2.3 or higher) with GD graphics library and mbstring extension library.
– MySQL(version 4.1 or higher) installed on your Linux VPS.
Login to your VPS via SSH
Update the system
[user]$ sudo apt-get update && sudo apt-get -y upgrade
Install MySQL so you can create the database needed. Run the following command:
# apt-get install mysql-server mysql-client
Now run the post-installation script ‘mysql_secure_installation’ in order to set the MySQL root user password:
# mysql_secure_installation - Set root password? [Y/n] y - 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
So, you set the MySQL root password to your liking. Next thing you need to do is to create a database. Login to your MySQL service as root:
[user]$ mysql -u root -p mysql> CREATE DATABASE cubecart; mysql> GRANT ALL PRIVILEGES ON cubecart.* TO 'cubeuser'@'localhost' IDENTIFIED BY 'your-password'; mysql> FLUSH PRIVILEGES; mysql> \q
Do not forget to replace ‘your-password’ with a strong password.
Install Apache2 web server
[user]$ sudo apt-get install apache2
Install PHP and required PHP modules
To install the latest stable version of PHP 5 and all required modules, run:
[user]$ sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-gd php5-curl
Download and extract the latest version of CubeCart to a directory on your server:
[user]$ sudo cd /opt && wget https://www.cubecart.com/download/CubeCart-6.0.8.zip [user]$ mkdir cubecart [user]$ sudo unzip CubeCart-6.0.8.zip -d cubecart/ [user]$ sudo mv cubecart/ /var/www/html/cubecart/
All files should be readable by the web server, so set the proper ownership:
Now just $43 .99
[user]$ sudo chown www-data:www-data -R /var/www/html/cubecart
Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘cubecart.conf’ on your virtual server:
[user]$ sudo touch /etc/apache2/sites-available/cubecart.conf [user]$ sudo ln -s /etc/apache2/sites-available/cubecart.conf /etc/apache2/sites-enabled/cubecart.conf [user]$ sudo nano /etc/apache2/sites-available/cubecart.conf
Then, add the following lines:
<VirtualHost *:80> ServerAdmin email@example.com DocumentRoot /var/www/html/cubecart/ ServerName your-domain.com ServerAlias www.your-domain.com <Directory /var/www/html/cubecart/> Options FollowSymLinks AllowOverride All </Directory> ErrorLog /var/log/apache2/your-domain.com-error_log CustomLog /var/log/apache2/your-domain.com-access_log common </VirtualHost>
Restart the Apache web server for the changes to take effect:
[user]$ sudo service apache2 restart
Open your favorite web browser, navigate to http://your-domain.com/ and if you configured everything correctly the CubeCart installer should be starting. You should follow the easy instructions on the install screen inserting the necessary information as requested.
Once you finish the installation you can access the admin section at:
Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install CubeCart for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
1 thought on “How to install CubeCart on Ubuntu 14.04”
Thanks for the great tutorial! Awesome work.