In this tutorial, we will guide you through the step-by-step process of installing Magento Open Source from https://github.com/magento/magento2 on Clear Linux Latest.
Before beginning with the installation, please ensure that your system meets the following minimum requirements:
Let's get started!
To install PHP and the required PHP modules, follow these steps:
su
swupd bundle-add php-basic php-mysql php-pdo php-json php-openssl php-curl php-mbstring unzip libxrender libxext libxslt libpng php-imagick
php -v
This will display the version of PHP installed.
To install MySQL, do the following:
su
swupd bundle-add mysql
mysql_secure_installation
To download and extract Magento, follow these steps:
Open a terminal window.
Go to the directory where you want to install Magento.
cd /var/www/html/
git clone https://github.com/magento/magento2.git
cd magento2
git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
composer install
mysql -u root -p
CREATE DATABASE magento;
CREATE USER 'magento'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON magento.* TO 'magento'@'localhost';
FLUSH PRIVILEGES;
quit
env.php.dist
file and rename it to env.php
.cd /var/www/html/magento2
cp ./app/etc/env.php.dist ./app/etc/env.php
env.php
file and add your MySQL credentials.nano ./app/etc/env.php
Update section 'db' with the following:
'db' =>
array (
'table_prefix' => '',
'connection' =>
array (
'default' =>
array (
'host' => 'localhost',
'dbname' => 'magento',
'username' => 'magento',
'password' => 'password',
'active' => '1',
),
),
),
cd /var/www/html/magento2
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+w {} +
chmod u+x bin/magento
To install Magento, run the following command:
php bin/magento setup:install --base-url=http://localhost/ --db-name=magento --db-user=magento --db-password=password --backend-frontname=admin --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
This command will install Magento with the given configuration options.
After installing Magento, complete these final steps:
http://localhost
or http://127.0.0.1
Enter the admin username and password you specified during the installation.
Click on the "Sign In" button.
Congratulations! Your Magento installation is complete.
In this tutorial, you learned how to install Magento Open Source on Clear Linux Latest. We hope this tutorial has been helpful to you. If you have any questions, please feel free to leave a comment below.
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!