Question
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."
Solution
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.
OTHER TIPS
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 --admin-email=email@email.com--admin-user=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 --admin-email=email@email.com --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