Install Magento 2 with Sample Data
Clone magento2 repo on github:
1 |
git clone git@github.com:magento/magento2.git <your folder name> |
1 |
cd <your folder name> |
Set owner:
1 |
sudo chown -R :http . |
1 |
sudo chown -R :apache . |
1 |
sudo chown -R :www-data . |
Set files and folders permission:
1 |
find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento |
If you must enter the commands as sudo, use:
1 |
sudo find . -type d -exec chmod 770 {} \; && sudo find . -type f -exec chmod 660 {} \; && sudo chmod u+x bin/magento |
Run composer:
1 |
composer install |
Then install Magento via browser or command line.
Install Sample Data
1 |
sudo chmod +x bin/magento |
1 |
sudo php bin/magento sampledata:deploy |
this will add the various require to composer.json
1 |
sudo php bin/magento setup:upgrade |
Install Sample Data [2nd way]
1 |
sudo chmod +x bin/magento |
1 |
git clone https://github.com/magento/magento2-sample-data.git <your sample-data folder> |
1 |
php -f <your sample-data folder>/dev/tools/build-sample-data.php -- --ce-source="<your folder name>" |
1 |
sudo php bin/magento setup:upgrade |
Recent Comments