Bagisto is an open-source eCommerce platform, which is built on various open source technologies, such as PHP framework, Laravel, Vue.js, MySQL. It is built for merchants to launch their own shopping cart system with a wide variety of fully controllable features. It also offers numerous post-commerce solutions, such as Marketplace solutions, POS solutions, PWA App, and Dropship solutions.
★ Private Cloud Setup Step By Step Using Apache Cloud Stack
★ How To Install Zabbix 5.0 On Debian 10 Server
Ubuntu Server Prerequisites:
Operating System : Ubuntu 20.04 Server : Apache 2 Ram : 1 GB Php : 7.4 Mysql : 8.0 (We’re creating a localhost database) Node.js : 10.x cURL & Composer
Install Prerequisites
Log in to your Ubuntu Server 20.04 and after logging in, install the necessary application software.
Step #01: Install Apache2, php7.4, and its modules by executing the listed commands in the correct order.
$ sudo apt update $ sudo apt install apache2 -y $ sudo systemctl start apache2.service $ sudo systemctl enable apache2.service $ sudo apt-get install -y php7.4 php7.4- {common,gmp,curl,soap,bcmath,intl,mbstring,xmlrpc,mysql,gd,xml,cli,zip} libapache2-mod-php7.4
If any of the PHP modules remains, simply through this command, you may install it.
$ sudo apt-get install php7.4-<module_name>
Check the version of PHP. If it is php7.4.x, then allow the PHP-module apache and the rewrite apache module.
$ php -v $ sudo a2enmod php7.4 $ sudo a2enmod rewrite $ sudo service apache2 restart
Step #02: Install Curl and Node.js version 10.x
$ sudo apt-get install curl $ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - $ sudo apt-get install -y nodejs
Step #03: Install the Composer
$ apt install composer -y $ composer -V
Step #04: SSH User creation
Presently, we were in our server’s root user, but because of security issues, we do not keep our application code in the directories of the root user. So, we have to create another SSH user for this. Create an SSH user who will be the owner of the application code. I created an SSH user with the name “bagisto.” You can pick any name you want.
$ sudo adduser bagisto
This prompts a password window where you can set the password. The remaining fields can be left
empty by simply pressing the enter key. After creating a user, we will switch to a new user.
$ su - bagisto
Step #05: Download Bagisto by using the command below:
$ composer create-project bagisto/bagisto
After downloading, a directory name “bagisto” will be created inside the public HTML directory, then
goes to the public directory / bagisto. It is the directory that loads index.php.
$ cd bagisto/public
Step #06: Apache configuration
To support the web pages we will configure apache. So, we need to switch again to the root user for
configuring apache.
$ exit $ sudo nano /etc/apache2/sites-enabled/000-default.conf
You will find the following lines as shown below, after executing the above command.
Now, change this to :
DocumentRoot /home/bagisto/bagisto/public/
Save it (press Ctrl+x then press y), and exit after this.
Configure the envvars file by executing the below command :
sudo nano /etc/apache2/envvars
And replace www-data to bagisto
And configure file apache2.conf by the following command :
$ sudo nano /etc/apache2/apache2.conf
You will find the block code as shown below :
Change it to the following code :
<Directory /home/bagisto/bagisto/public/> Options FollowSymLinks AllowOverride All Require all granted </Directory>
Save it (press Ctrl+x then press y), and exit it.
Step #07: Create database and setup permission.
Install MYSQL Server for database creation by executing the following commands and, when a password is asked after the below two commands, simply press ENTER.
$ sudo apt-get install mysql-server $ sudo mysql -u root -p $ create database bagisto; $ CREATE USER 'bagistouser'@'localhost'IDENTIFIED WITH mysql_native_password BY 'bagisto'; $ GRANT ALL ON bagisto.* TO 'bagistouser'@'localhost' WITH GRANT OPTION; $ flush privileges; $ exit;
Meanwhile, make some changes to php.ini file.
sudo nano /etc/php/7.4/apache2/php.ini
Change as like below config.
file_uploads = On allow_url_fopen = On short_open_tag = On memory_limit = 256M upload_max_filesize = 100M max_execution_time = 360 date.timezone = America/Chicago
After all the above mentioned steps, please enable permission to access your Bagisto root directory as shown below:
Step #08: Bagisto configuration
Now go to your Bagisto root directory and run the mentioned commands below and put the mysql database in the .env filename. Then enter the details and use the same credentials you get while creating a database.
$ sudo cp .env.example .env $ sudo nano .env
Save it (press Ctrl+x then press y), and exit it.
Now go to Mysql database again and run the following command
$ SET GLOBAL log_bin_trust_function_creators = 1;
Now come out from the mysql console and run the following command
sudo php artisan bagisto:install
Now Press 0 to and enter
Now run the below commands to set the permission on Bagisto root directory
$ sudo chmod -R 755 /home/bagisto/bagisto $ sudo chown -R bagisto:bagisto /home/bagisto/bagisto $ sudo service apache2 restart
After that access, the dashboard by hitting the URL “example.com/admin/” in the Admin panel, the admin login will open as in the image below. In addition, this is what the default admin dashboard looks like. As a result, the homepage of your default eCommerce website will be like this:
Conclusion:
In this tutorial, you learned how to install Bagisto on an Ubuntu 20.04 LTS server. In short, your
eCommerce platform is ready to use. You may now proceed with your online store.
Video coming soon …….:)
- How To Install Zabbix Server 6.4 On AlmaLinux 8 Server - August 9, 2024
- How To Clear RAM Memory Cache Buffer Linux Server - February 29, 2024
- How To Install Apache Cloud Stack Management Server 4.17 On Ubuntu 22.04 - February 1, 2024
Leave a Comment