How to Install Bagisto with LAMP Stack on Rocky Linux 8

Bagisto is an eCommerce ecosystem designed for all to build and scale your business. It's a free and open-source eCommerce framework that offers you a wide range of functionality and lets you have total control of your store. Built on top of the Laravel stack, it is coupled with easy product information management and fast time to market the product. Besides, the framework is very flexible and easy to use even for non-tech savvies. In this article, we are going to learn how to install Bagisto on Rocky Linux 8. So, let’s get started.

Checkout the Bagisto Project Here.

Try this wiki on our VPS. Starting at just $5/month with 24x7 In-house customer support.

Pre-requisites :

  • A system with Rocky Linux 8 installed and running.

  • root access to the system.

  • Composer installed and running, for this, you can refer to one of our guides on installing the Composer on Rocky Linux 8.

  • LAMP Stack installed and running, for this, you can refer to one of our guides on installing the LAMP Stack (Apache, MariaDB, and PHP).

Once you're all set, we'll proceed with Bagisto installation and configuration.

Create Database

Let us begin with creating a Database and a user. We will then grant the required privileges to the user so it can interact with the Database.

mysql -u root



GRANT ALL PRIVILEGES ON crowncloud.* TO 'crowncloud'@'localhost';



The above commands will give complete access to the user crowncloud. Replace YOUR-PASSWORD-HERE with a safe and secure password.

Install Let's Encrypt SSL Certificate

Next we will install Let's Encrypt SSL cert so we can have the domain running on HTTPS.
You can refer the following link for instructions on how to Install Let's Encrypt.

Download Bagisto

Download Bagisto from official website : Click here.

cd /var/www/html/bagisto



mv bagisto-1.3.2 bagisto


cd /var/www/html/bagisto/bagisto/

Setting up File Permissions

Let's make the folders readable.

chmod -R 755 /var/www/html/bagisto/bagisto/

chmod -R 755 /var/www/html/bagisto/bagisto/public

chmod -R 755 /var/www/html/bagisto/bagisto/storage

chmod -R 755 /var/www/html/bagisto/bagisto/bootstrap/cache

chown -R apache:apache /var/www/html/bagisto/bagisto/

chcon -R -t httpd_sys_content_rw_t /var/www/html/bagisto/bagisto/

Install Bagisto

Let's install Bagisto

composer install

composer create-project bagisto/bagisto

php artisan bagisto:install

php artisan serve

Configuring Apache vHost

Create a new apache configuration file for the domain with the following command:

vi /etc/httpd/conf.d/

Add the following codes:

<VirtualHost *:80>

DocumentRoot /var/www/html/bagisto/bagisto/public

<Directory /var/www/html/bagisto/bagisto/public/>
    Options -Indexes +FollowSymLinks
    AllowOverride All

ErrorLog /var/log/httpd/
CustomLog /var/log/httpd/ combined


Change with Your Domain Name.

Now, press the Esc key, and type :wq! and press the Enter key to save and exit the file.

Now, restart & check the apache with the following commands:

systemctl restart httpd

systemctl status httpd

Enable Firewall:

firewall-cmd --permanent --add-service=http

firewall-cmd --permanent --add-service=https

firewall-cmd --zone=public --permanent --add-port 8000/tcp

firewall-cmd --reload

Accessing Bagisto

Now open the URL from your browser, this will redirect you to the Bagisto.

Replace the with the actual IP or domain configured on the server.

Example Screenshots:

Now you have successfully installed Bagisto with LAMP Stack on Rocky Linux 8.