Bagisto is an open-source eCommerce framework built on Laravel, designed to provide a flexible and feature-rich platform for building online stores. In this guide, we will walk through the steps to install Bagisto on Debian 11.

Step 1: Update Your System

Start by ensuring your system is up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Dependencies

Install the necessary packages including PHP and extensions:

sudo apt install -y nginx mysql-server php php-mbstring php-xml php-curl php-zip php-gd php-mysql php-json php-bcmath php-xmlrpc

Step 3: Install Composer

Bagisto uses Composer to manage dependencies. Install Composer using the following commands:

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

Step 4: Download Bagisto

Clone the Bagisto repository from GitHub:

git clone https://github.com/bagisto/bagisto.git /var/www/bagisto

Step 5: Install Bagisto

Navigate to the Bagisto directory:

cd /var/www/bagisto

Install the dependencies using Composer:

composer install

Step 6: Configure Environment Variables

Copy the example environment file:

cp .env.example .env

Open the .env file for editing:

nano .env

Set your database configuration:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=bagisto
DB_USERNAME=your_username
DB_PASSWORD=your_password

Replace your_username and your_password with your actual MySQL credentials.

Step 7: Generate Application Key

Generate the application key using Artisan:

php artisan key:generate

Step 8: Set Up Database

Log into MySQL to create a database for Bagisto:

sudo mysql -u root -p

Run the following commands to create the database and user:

CREATE DATABASE bagisto;
CREATE USER 'your_username'@'localhost' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON bagisto.* TO 'your_username'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 9: Configure Nginx for Bagisto

Create a new Nginx configuration file for Bagisto:

sudo nano /etc/nginx/sites-available/bagisto

Add the following configuration:

server {
        listen 80;
        server_name your_domain_or_ip;

        root /var/www/bagisto/public;
        index index.php index.html index.htm;

        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }

        location ~ \.php$ {
            include fastcgi_params;
            fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        }

        location ~ /\.ht {
            deny all;
        }
    }

Replace your_domain_or_ip with your actual domain name or IP address.

Step 10: Enable Nginx Site and Restart Services

Enable the Bagisto site configuration and restart Nginx:

sudo ln -s /etc/nginx/sites-available/bagisto /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Step 11: Access Bagisto

You can now access the Bagisto web interface by navigating to:

http://your_domain_or_ip

Follow the on-screen instructions to complete the installation and setup.

Conclusion

You have successfully installed Bagisto eCommerce on Debian 11. This powerful eCommerce platform will help you build and manage your online store efficiently.

If you're looking for a reliable hosting solution for your Bagisto instance, consider using Windows VPS UK. With Windows VPS, you can efficiently host your applications and ensure high performance. Whether you need VPS UK Windows or Windows Virtual Private Servers, you'll find a solution that fits your requirements.

For larger deployments or enterprise needs, explore Windows Virtual Dedicated Server Hosting or Virtual Private Server Hosting Windows. Whether you're located in the UK, Italy, or elsewhere, Windows VPS Italy and UK VPS Windows offer reliable hosting options. Visit Windows VPS Hosting UK to discover the best hosting solutions for your Bagisto deployment.

Cette réponse était-elle pertinente? 0 Utilisateurs l'ont trouvée utile (0 Votes)