This tutorial will guide you through the steps to install Magento Open Source on Linux Mint.
Before installing Magento, you will need to ensure that:
Follow these easy steps to install Magento:
First, download Magento Open Source from the GitHub repository using the following command:
git clone https://github.com/magento/magento2.git
Navigate to the Magento root directory and install the dependencies using Composer.
cd magento2
composer install
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.
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.
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
To enable Apache rewrite module, run the following command:
sudo a2enmod rewrite
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!