sAmI
sAmIhttps://losersgaming.com
I'm a freelancer and a semi-professional VALORANT Player from Pakistan, Expert in Network & System Administration & WordPress Developing.

How to install Bagisto on Ubuntu/Debian Servers

Today you will learn How to install Bagisto on Ubuntu/Debian Servers

Bagisto is a free, open-source eCommerce Platform. It is developed on Laravel and Vue.JS. It is a complete e-Commerce solutions for users who are looking to start their business and wants to sell their product online. So, it comes with many features like Responsive Front-End, Modern Admin Panel, Multiple Payment Gateways, Payment Gateway Integration, Access Control Levels, Multi-Currency etc. It provides users with small,medium to any size of businesses with a complete e-Commerce Package.

Requirements :

  • 2-4GB of RAM (The more the better performance)
  • 2vCore CPU (The more the lesser hiccups)
  • 10-20GB of Disk Space (Just in case if your product list goes huge..)
  • PHP 7.2 or greater

Step 1 : Update your server

First step is to update your server and look for any newer packages available for your distribution

apt-get update -y
apt-get upgrade -y

Step 2 : Installing LAMP Stack

Second step is to configure a LAMP Stack on your machine, Run the following commands to quickly configure a LAMP Stack

To install PHP7 or greater :

– Do the following for Debian Servers

apt install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo “deb https://packages.sury.org/php/ $(lsb_release -sc) main” > /etc/apt/sources.list.d/php.list
apt update

– Do the following for Ubuntu Servers

apt -y install software-properties-common
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-gd php7.4-bcmath php7.4-imap php7.4-xml php7.4-cli php7.4-zip
apt-get install mariadb-server mariadb-client
mysql_secure_installation

Copy the steps as shown in the picture or text

Set root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] n
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
mysql -u root -p
CREATE DATABASE bagistodb;
CREATE USER 'bagistouser'@localhost IDENTIFIED BY 'bagistopassword';
GRANT ALL PRIVILEGES ON bagistodb.* TO 'bagistouser'@localhost;
EXIT;

Step 3 : Install NodeJS & Composer

Bagisto required NodeJS & Composer, We can install the LTS Release by running the following commands :

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
apt-get install nodejs
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Step 4 : Install Bagisto on Ubuntu/Debian Servers

We have now everything required installed for Bagisto, Now we can simply download the Bagisto files and install it!

apt-get install unzip
wget https://github.com/bagisto/bagisto/archive/refs/tags/v1.4.1.zip
unzip v1.4.1.zip
mv bagisto-1.4.1/ /var/www/bagisto

Run the following command to install bagisto

cd /var/www/bagisto
composer install

You will see the following output :

Give permissions and change ownership :

chown -R www-data:www-data /var/www/bagisto/ 
chmod -R 755 /var/www/bagisto/

Create a new a configuration file for apache2

nano /etc/apache2/sites-available/bagisto.conf

Paste the following content into the life and change the domain name according to you site

<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/bagisto/public
ServerName yourdomain.com
ServerAlias www.yourdomain.com

<Directory /var/www/bagisto/public/>
      Options FollowSymlinks
      AllowOverride All
      Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Enable the bagisto.conf in apache2 and restart it

a2ensite bagisto.conf  
a2enmod rewrite
systemctl restart apache2.service

You can access your site at http://yourwebsite.com/

You will see the following screen :

1.

2. Set the configuration as per your own requirements :

3. Change the database details as created while installing LAMP Stack

4. Create an administrator user for your site :

5. You can access your Bagisto Website :

6. Bagisto Admin Dashboard :

Conclusion :

You have installed Bagisto e-Commerce Platform on your machine. This tutorial is tested on Ubuntu/Debian Machines. This tutorial assumes you are root!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook