Install Magento 2 Commandline Linux CentOS

Follow the below steps to install Magento 2 with sample-data.

Make sure that httpd / Nginx,PHP,MySQL and Composer are installed in the server by issuing the following commands

httpd -v / nginx -v
php -v
composer -v

Change the directory to documet root

cd /var/www/html/

Download Magento and issue the following commands

sudo git clone

cd magento2

sudo git checkout tags/2.2.1 -b 2.2.1

chown -R httpd:www /var/www/html/magento2/

sudo chmod -R 775 /var/www/html/magento2/

chmod 777 var/ generated/ app/etc/ pub/

composer install

composer update

composer config repositories.0 composer

php bin/magento setup:install --base-url= --backend-frontname=admin \
--db-host= --db-name=mage2 --db-user=root --db-password=Root@123 \
--admin-firstname=Magento --admin-lastname=User \
--admin-user=admin --admin-password=admin17 --language=en_US \
--currency=USD --timezone=America/Chicago --use-rewrites=1

php bin/magento sampledata:deploy

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

Now check the site .

Leave a Reply

Your email address will not be published. Required fields are marked *