How to Install Magento Open Source on Linux Mint Latest

This tutorial will guide you through the steps to install Magento Open Source on Linux Mint.

Prerequisites

Before installing Magento, you will need to ensure that:

Steps to install Magento Open Source

Follow these easy steps to install Magento:

Step 1: Download Magento Open Source from GitHub

First, download Magento Open Source from the GitHub repository using the following command:

git clone https://github.com/magento/magento2.git

Step 2: Install dependencies using Composer

Navigate to the Magento root directory and install the dependencies using Composer.

cd magento2
composer install

Step 3: Configure the database

Create a new database in MySQL for Magento and configure access to the database. Open the app/etc/env.php file and update the database connection settings as follows:

'db' => [
     'table_prefix' => '',
     'connection' => [
         'default' => [
             'host' => 'localhost',
             'dbname' => 'magento',
             'username' => '<your-username>',
             'password' => '<your-password>',
             'active' => '1'
         ]
     ]
],

Note: Replace <your-username>, <your-password>, and magento with your desired values.

Step 4: Install Magento

Run the following command to install Magento:

bin/magento setup:install \
--base-url=http://localhost/magento2 \
--db-host=localhost \
--db-name=magento \
--db-user=<your-username> \
--db-password=<your-password> \
--admin-firstname=admin \
--admin-lastname=admin \
--admin-email=admin@example.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1

Note: Replace <your-username> and <your-password> with your desired values.

Step 5: Set file permissions

Set the appropriate file permissions using the following commands:

find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} +
find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} +
chown -R :www-data .
chmod u+x bin/magento

Step 6: Enable Apache Rewrite module

To enable Apache rewrite module, run the following command:

sudo a2enmod rewrite

Step 7: Restart Apache server

Finally, restart the Apache server with the following command:

sudo service apache2 restart

Congratulations! Magento Open Source has been successfully installed on your Linux Mint system. You can now access your store at http://localhost/magento2.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!