Magento 2 – by Composer on all inclusive. install / Update: now with Rackspeed Info

Ok, This is a relatively special post, but still. It should be a question in a new All-Inclusive. to install account first Composer, then easily Magento in the current version (2.x) to install.

  1. Creating a new all-Inkl. account.
  2. Enabling SSH access for this account.
  3. Per Putty (o.ä.) connect to the account.
  4. In the root directory of the account a new directory / bin Create. SSH with the command mkdir bin
  5. Then go to the directory with the command cd bin
  6. There, run this command
    curl -sS https://getcomposer.org/installer | php

    Alternatively, you can also use this “verified” Weg gehen: https://getcomposer.org/download/

  7. Now back to the root switch by cd ..
  8. Here are the .user_bashrc file is created, to later simply to access the Composer. This requires the account identifier, which is already seen in the command line.
    echo "alias composer='/www/htdocs/wXXXXXX/bin/composer.phar'" >> /www/htdocs/wXXXXXX/.user_bashrc

    the two wXXXXXX must then be replaced with their own w ID.
    In case of installation on Rackspeed, The command then looks differently from Sun

    echo "alias composer='php ~/bin/composer.phar'" >> ~/.bashrc
  9. Then the Bash restart by the command source /.bashrc (at Rackspeed by . ~/.bashrc )
  10. Now you can test, whether the composer works, by e.g.. composer –help enters
  11. If something like “bash composer command not found” kommt, did not work out something as it should. Then check the steps above. Otherwise, there is an answer.
  12. NOW we get to Magento 2.x installation.
  13. First we create a directory, which must necessarily be empty, because the installation process will not work.
  14. For this purpose e.g..
    mkdir magento

    or how the directory is hot run

  15. Dann
    composer create-project --repository=https://repo.magento.com/ magento/project-community-edition magento

    wherein the last “magento” stands for the respective gewünsche and previously created directory.

  16. Next, the user name and password for the download of Magento are queried. A common mistake is, that here are the credentials (eMail & PW) enters from magento.com. These credentials are not meant – leider. This refers to Public- und Private-key. This is obtained after among themselves https://marketplace.magento.com/customer/account/ has logged into his account. There then “My Profile” click and then “My Products” on “Access Keys”.
  17. Here you will create is a new key for the project.
  18. Now you get a Public- and a private key. The former then you take as a user for the Magento installation and – surprise! – the zweiteren as a password. (no surprise here, that nothing is displayed in the console after inserting! That PW is displayed even by xxxx or similar. Simply insert and boarding)
  19. Now, the Composer will automatically download the latest version of Magento and installs or. unpacks the data in the selected directory.
  20. If the composer a nice info as e.g..
    magento/product-community-edition 2.3.0 requires php ~7.1.3||~7.2.0 -> your PHP version (7.0.32) does not satisfy that requirement.

    spit, the compatibility check has revealed the Composer, that this Magento version (strenggenommen) can not install. This can then deal by saying the Composer, that he should not check requirements. This does you by the o.g. Command a little adapts

    composer create-project --repository=https://repo.magento.com/ magento/project-community-edition --ignore-platform-reqs magento

    here is the last “magento” to be for the directory in which you installed.

  21. Should now occur an error during installation, the Sun is as
    PHP Fatal error:  Uncaught TypeError: Return value of MagentoInventoryComposerInstallerPlugin::initModuleDeployment() must be an instance of MagentoInventoryComposerInstallervoid, none returned in /vendor/magento/inventory-composer-installer/src/Plugin.php:69

    this is because most, that is the wrong version of PHP used when installing the Composer. This can thus be changed by running this command via SSH

    ln -sfv /usr/bin/php72 /usr/bin/php

    72 is here now for the PHP version 7.2 you can customize this, of course, subject to availability on the server. The installation can then be started normally then.

  22. is a bit annoying, that the installation directory must be completely empty. Since many servers have a habit of quickly some information, such as “Here soon created a website” o.ä. to copy the directory, you have to look here. Some of the files are not displayed by the Web-FTP. Since then you have e.g.. use Filezilla. is also annoying, that the composer has already been copied to this error message itself some files to the desired install directory. I have not found a, that he will continue to the point where he had broken off, there remained only the directory to empty (or simply rename and a new, to create the same name and then later delete the old directory) and re-execute the command.
  23. That would be the Composer Magento installation.
  24. If one calls the stored in the all-inclusive account Domain / URL (the course of the o.g. should route installation directory) and completes the Magento installation process as usual.

Used in Magento Version 2.2.6 Comments? Additions? Notes? Gladly!

Published by Covos

Since 2009 I have been working intensively with Magento. I started with the creation and operation of B2C stores. This was extended through my work in the logistics sector. This resulted first specialized B2E systems. Today I work day-a day with exciting B2C, B2B- and B2E projects and reports in this blog about challenges and give insider tips.

4 comments on “Magento 2 – by Composer on all inclusive. install / Update: now with Rackspeed Info”

  1. First of all thanks for this interesting post:-)
    One question I have regarding the required permissions, the at All-Inclusive. seem to be very specific:
    Is not it, that still various rights must be set for specific directories? Could you say something about this topic?

  2. Moin,
    I get the following error message:

    PHP Fatal error: Uncaught TypeError: Return value of MagentoInventoryComposerInstallerPlugin ::initModuleDeployment() must be an instance of MagentoInventoryComposerInstallervoid, none r eturned in /www/htdocs/w0159542/magento/vendor/magento/inventory-composer-installer/src/Plugin. php:69
    Stack trace:
    #0 /www/htdocs/w0159542/magento/vendor/magento/inventory-composer-installer/src/Plugin.php(88): MagentoInventoryComposerInstallerPlugin->initModuleDeployment()
    #1 /www/htdocs/w0159542/magento/vendor/magento/inventory-composer-installer/src/Plugin.php(82): MagentoInventoryComposerInstallerPlugin->getModuleDeployment()
    #2 [internal function]: MagentoInventoryComposerInstallerPlugin->onPackageChange(Object(Compo serInstallerPackageEvent))
    #3 phar:///www/htdocs/w0159542/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.p hp(176): call_user_func(Array, Object(ComposerInstallerPackageEvent))
    #4 phar:///www/htdocs/w0159542/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.p hp(116): ComposerEventDispa in /www/htdocs/w0159542/magento/vendor/magento/inventory-composer- installer/src/Plugin.php on line 69

    Fatal error: Uncaught TypeError: Return value of MagentoInventoryComposerInstallerPlugin::this tModuleDeployment() must be an instance of MagentoInventoryComposerInstallervoid, none return ed in /www/htdocs/w0159542/magento/vendor/magento/inventory-composer-installer/src/Plugin.php:6 9
    Stack trace:
    #0 /www/htdocs/w0159542/magento/vendor/magento/inventory-composer-installer/src/Plugin.php(88): MagentoInventoryComposerInstallerPlugin->initModuleDeployment()
    #1 /www/htdocs/w0159542/magento/vendor/magento/inventory-composer-installer/src/Plugin.php(82): MagentoInventoryComposerInstallerPlugin->getModuleDeployment()
    #2 [internal function]: MagentoInventoryComposerInstallerPlugin->onPackageChange(Object(Compo serInstallerPackageEvent))
    #3 phar:///www/htdocs/w0159542/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.p hp(176): call_user_func(Array, Object(ComposerInstallerPackageEvent))
    #4 phar:///www/htdocs/w0159542/bin/composer.phar/src/Composer/EventDispatcher/EventDispatcher.p hp(116): ComposerEventDispa in /www/htdocs/w0159542/magento/vendor/magento/inventory-composer- installer/src/Plugin.php on line 69

    Any idea what kind of a mistake and how I can solve the problem?

    Best Regards

Leave a Reply

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