使用示例数据安装magento2

When I install the magento2, I am unable to install sample data, the 'Use Sample Data' is disabled. I am unable to install sample data. How can I fix it ?

Note : I was able to install magento2 without sample data.

For sample data, create a new Database. Before setting up magento, first download 'magento-sample-data-1.6.0.0.tar.gz' file from here http://inchoo.net/magento/magento-sample-data/

Extract it which will have a sql file. Import it from phpmyadmin or terminal into your newly created database.Also copy media/catalog folder into your magento's media

Then install magento using same database name.

In the docs http://devdocs.magento.com/guides/v2.0/install-gde/install/composer-clone.html there is a box which says

We're aware of issues with installing optional sample data after cloning the develop branch. If you plan to use sample data, clone the master branch.

And you follow that link to here to learn about the problem: http://devdocs.magento.com/guides/v2.0/install-gde/trouble/tshoot_sample-data.html

And then grab the master branch,

You might have better luck with the sample data: http://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data.htm

You can install magento sample data after or before magento setup.

Please follow the step is in this tutorial. it is working.

http://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data.html#instgde-install-sample-intro

when you following steps and complete the installation magento sample data before magento setup after magento 'Use Sample Data' will enable for you. if you have already setup magento without sample data, you can also install sample data after magento setup.

You can now install Magento 2 sample data before or after installing the software, using either the master (more stable) or develop (more recent) branch. If you use the Setup Wizard, there is no longer a Use Sample Data check box.

Note that by GA, there will also be a command-line installation option.

Summary of steps:

  1. Clone the Magento 2 Github develop or master branch.
  2. Clone the Magento 2 sample data repo.
  3. Link the repositories. php -f /deve/tools/build-sample-data.php -- --ce-source=""
  4. Set file system permissions and ownership on the sample data clone dir.
  5. Install Magento.

If Magento is already installed, run:

php /bin/magento setup:upgrade

Reference: http://devdocs.magento.com/guides/v2.0/install-gde/install/web/install-web-sample-data.html

You can install sample data through command line:

php <your Magento install dir>/bin/magento sampledata:deploy

Just use <php -dmemory_limit=6G /bin/magento sampledata:deploy> command and then upgrade and setup static content. Don't forget to flush the cache

install sample-data after Magento setup. use this command for installing sample data

php bin/magento sampledata:deploy

Here system will require username and password for your magento.com. Use your magento store Public and private keys as username and password. than run this command

php bin/magento setup:upgrade

Than run this command

php bin/magento setup:static-content:deploy -f