6

Anybody do a successful install of magento 2 only via composer ? I found a nice article here : http://magenticians.com/installing-magento-2-composer but sadly it's outdated. I tried it and I get errors :

The requested package magento/community-edition could not be found in any version, there may be a typo in the package name.

Tried to change package to project-community-edition and got

Installation request for magento/project-community-edition *@dev -> satisfiable by magento/project-community-edition[dev-master].

magento/project-community-edition dev-master requires zendframework/zend-stdlib 2.0.3 -> no matching package found."
1

4 Answers 4

3

The composer.json from magenticians is not up to date anymore. The following composer.json does work as of today, tested with Ubuntu 14.04

{   "minimum-stability": "dev",
    "require": {
        "magento/project-community-edition": "*@dev"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/magento/magento2.git"
        }
    ]
}

You will need a GitHub account (because of rate limiting issues) and the git command line utility installed.

1
  • composer.json is updated with each release, so you must have your composer up to date, try composer update before composer install
    – PartySoft
    Commented Jul 17, 2015 at 14:35
0

I have two methods for installing Magento 2 with Sample Data and with database by composer in "developer mode" on terminal.


1 - Magento2 Install with Sample Data in developer mode on terminal

  • Copy composer.json in root folder project

    wget https://raw.githubusercontent.com/magento/magento2-community-edition/master/composer.json
    
  • Change Magento2 Version from 2.0.2 to 2.0.7 or last version => https://goo.gl/rk9bYK

  • Run commands in terminal without sudo

    • Magento2 download

      composer install
      
    • Add Magento2 Sample Data in composer

      php bin/magento sampledata:deploy
      
    • Add credential for Username and Password -> https://goo.gl/9eyOE0

    • Magento2 Sample Data Download

      composer update
      
    • Magento2 set permisions

      chmod -R 0777 var/
      chmod -R 0777 pub/static
      chmod -R 0777 pub/media/
      chmod -R 0777 app/etc/
      
    • Magento2 Install with Sample Data in terminal

      php bin/magento setup:install --base-url=http://domain.com/ --db-host=localhost --db-name=database --db-user=root --db-password=root --admin-firstname=FirstName --admin-lastname=LastName [email protected]=admin --admin-password=pass --language=en_US --backend-frontname=admin --use-sample-data --magento-init-params=“MAGE_MODE=developer”
      

2 - Magento2 Install with Sample Data in developer mode on terminal

  • Copy composer.json in root folder project

    wget https://raw.githubusercontent.com/magento/magento2-community-edition/master/composer.json
    
  • Change Magento2 Version from2.0.2 to 2.0.7 or last version => https://goo.gl/rk9bYK

  • Run commands in terminal without sudo

    • Magento2 download

      composer install
      
    • Magento2 Install

      • Install on browser
      • OR
      • Install on terminal

        php bin/magento setup:install --base-url=http://domain.com/ --db-host=localhost --db-name=database --db-user=root --db-password=root --admin-firstname=FirstName --admin-lastname=LastName [email protected] --admin-user=admin --admin-password=pass --language=en_US --backend-frontname=admin --magento-init-params=“MAGE_MODE=developer”
        
    • Add Magento2 Sample Data in composer

      php bin/magento sampledata:deploy
      
    • Add credential for Username and Password -> https://goo.gl/9eyOE0

    • Magento2 Sample Data Download

      composer update
      
    • Magento2 set permisions

      chmod -R 0777 var/
      chmod -R 0777 pub/static
      chmod -R 0777 pub/media/
      chmod -R 0777 app/etc/
      
    • Magento2 Sample Data install

      php bin/magento setup:upgrade
      
    • Magento2 deploy static content

      find pub/static \! -name '.htaccess' -delete
      php bin/magento setup:static-content:deploy
      php bin/magento cache:clean
      
0
0

You can check out this article- https://webscoot.io/blog/install-magento-2/

It covers all installation methods in a simplified manner. Hope it helps!

0

if you have some different errors maybe best way is

 composer install --no-suggest -o --ignore-platform-reqs --prefer-source

if you use dockergento than

dockergento  composer install --no-suggest -o --ignore-platform-reqs --prefer-source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.