How to Install AbanteCart on Ubuntu 16.04 LTS
AbanteCart is a free, open-source e-commerce platform based on PHP language. It is an ideal e-commerce solution for small to medium businesses. You can easily create your own online shopping cart using AbanteCart. It comes with powerful features including, support for digital and tangible products, support for a variety of payment gateways, SEO Friendly, Mobile support, Fast and secure, Using innovative technology like HTML5, Bootstrap, JQuery and much more.
In this tutorial, we will learn how to install AbanteCart on Ubuntu 16.04.
- A server running Ubuntu 16.04.
- A non-root user with sudo privileges.
Install Apache, PHP, and MariaDB
AbanteCart runs on Apache web server, written in PHP and uses MariaDB to store their data. So, you will require Apache, MariaDB, and PHP to work. First, install Apache, PHP and Other PHP modules by running the following command:
sudo apt-get install apache2 libapache2-mod-php7.0 php7.0 php7.0-gd php7.0-zip php7.0-curl php7.0-mbstring php7.0-mysql -y
Next, you will need to add the MariaDB repository to your system. Because, the latest version of the MariaDB is not available in Ubuntu default repository.
You can add the repository by running the following command:
sudo apt-get install software-properties-common -y
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64] http://www.ftp.saix.net/DB/mariadb/repo/10.1/ubuntu xenial main'
Next, update the repository by running the following command:
sudo apt-get update -y
Finally, install the MariaDB server with the following command:
sudo apt-get install mariadb-server -y
Next, start the Apache and MariaDB service and enable them to start on boot time by running the following command:
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl start mysql
sudo systemctl enable mysql
Configure Database for AbanteCart
By default, MariaDB installation is not secured. So you will need to secure it first. You can do this by running the `mysql_secure_installation` script.
Answer all the questions as shown below:
Enter current password for root (enter for none): Enter Set root password? [Y/n]: Y New password:
Re-enter new 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
Next, log into MySQL shell with the following command:
mysql -u root -p
Enter your root password, then create a database for AbanteCart using the following command:
MariaDB [(none)]> CREATE DATABASE abantecart;
Next, create a user for AbanteCart, assign a password and grant all privileges on AbanteCart database with the following command:
MariaDB [(none)]> CREATE user abantecart identified by 'password';
MariaDB [(none)]> GRANT ALL PRIVILEGES on abantecart.* to abantecart@localhost identified by 'password';
Next, flush the privileges with the following command:
MariaDB [(none)]> FLUSH PRIVILEGES;
Finally, exit from the MySQL shell with the following command:
MariaDB [(none)]> exit;
You can download the latest version of the AbanteCart from Git repository with the following command:
Next, extract the downloaded file with the following command:
Next, copy the public_html directory from extracted directory to the Apache web root directory with the following command:
sudo cp -r abantecart-src-master/public_html /var/www/html/abantecart
Next, give proper permissions to the abantecart directory:
sudo chown -R www-data:www-data /var/www/html/abantecart
sudo chmod -R 777 /var/www/html/abantecart
Next, you will need to create an Apache virtual host directive for AbanteCart. You can do this by creating abantecart.conf file.
sudo nano /etc/apache2/sites-available/abantecart.conf
Add the following lines:
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/abantecart ServerName yourdomain.com <Directory /var/www/html/abantecart/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog /var/log/apache2/abantecart-error_log CustomLog /var/log/apache2/abantecart-access_log common </VirtualHost>
Save and close the file, then enable the virtual host file with the following command:
sudo a2ensite abantecart
Finally, restart Apache service to apply all the changes:
sudo systemctl restart apache2
Access AbanteCart Web Interface
Now, open your web browser and type the URL http://yourdomain.com, you will be redirected to the AbanteCart installation wizard as shown in the following image:
Here, Agree to the License agreement and click on the Continue button, you should see the following page:
Here, validate all the requirements, then click on the Continue button, you should see the following page:
Here, provide your Database name, Database username, Database password, Admin username, and password, then click on the Continue button to start the installation. Once the installation is completed, you should see the following page:
Now, click on the Login to your Control Panel button, you will be redirected to AbanteCart login page as shown below:
Provide your admin credential and click on the Login button, you should see the AbanteCart Dashboard in the following image: