je refais ma procédure complète pour Drupal 8.4.0
mais sur mon Cloud Web avec 2 GB (sans swap file) :
**~/composer create-project drupal-composer/drupal-project:8.x-dev cloudweb2 --stability dev --no-interaction**
Installing drupal-composer/drupal-project (8.x-dev 6418a08f89b7580d1a51f47cb0f08afc0bd572e7)
- Installing drupal-composer/drupal-project (8.x-dev 6418a08): Cloning 6418a08f89
Created project in cloudweb2
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 104 installs, 0 updates, 0 removals
- Installing cweagans/composer-patches (1.6.2): Downloading (100%)
- Installing drupal-composer/drupal-scaffold (2.3.0): Downloading (100%)
- Installing composer/installers (v1.4.0): Downloading (100%)
- Installing symfony/finder (v3.3.10): Downloading (100%)
- Installing symfony/yaml (v3.2.13): Downloading (100%)
- Installing drupal/console-extend-plugin (0.9.2): Downloading (100%)
- Installing paragonie/random_compat (v2.0.11): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.6.0): Downloading (100%)
- Installing symfony/http-foundation (v3.2.13): Downloading (100%)
- Installing psr/simple-cache (1.0.0): Downloading (100%)
- Installing psr/log (1.0.2): Downloading (100%)
- Installing psr/cache (1.0.1): Downloading (100%)
- Installing symfony/polyfill-apcu (v1.6.0): Downloading (100%)
- Installing symfony/cache (v3.3.10): Downloading (100%)
- Installing symfony/expression-language (v3.3.10): Downloading (100%)
- Installing symfony/dom-crawler (v3.3.10): Downloading (100%)
- Installing symfony/css-selector (v3.3.10): Downloading (100%)
- Installing jakub-onderka/php-console-color (0.1): Downloading (100%)
- Installing jakub-onderka/php-console-highlighter (v0.3.2): Downloading (100%)
- Installing dnoegel/php-xdg-base-dir (0.1): Downloading (100%)
- Installing nikic/php-parser (v3.1.1): Downloading (100%)
- Installing symfony/var-dumper (v3.3.10): Downloading (100%)
- Installing symfony/debug (v3.3.10): Downloading (100%)
- Installing symfony/console (v3.2.13): Downloading (100%)
- Installing psy/psysh (v0.8.13): Downloading (100%)
- Installing psr/http-message (1.0.1): Downloading (100%)
- Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)
- Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
- Installing guzzlehttp/guzzle (6.3.0): Downloading (100%)
- Installing gabordemooij/redbean (v4.3.4): Downloading (100%)
- Installing vlucas/phpdotenv (v2.4.0): Downloading (100%)
- Installing drupal/console-dotenv (0.3.0): Downloading (100%)
- Installing webmozart/assert (1.2.0): Downloading (100%)
- Installing webmozart/path-util (2.3.0): Downloading (100%)
- Installing webflo/drupal-finder (1.0.0): Downloading (100%)
- Installing twig/twig (v1.35.0): Downloading (100%)
- Installing symfony/translation (v3.2.13): Downloading (100%)
- Installing symfony/process (v3.2.13): Downloading (100%)
- Installing symfony/filesystem (v3.3.10): Downloading (100%)
- Installing symfony/event-dispatcher (v3.2.13): Downloading (100%)
- Installing symfony/dependency-injection (v3.2.13): Downloading (100%)
- Installing symfony/config (v3.2.13): Downloading (100%)
- Installing stecman/symfony-console-completion (0.7.0): Downloading (100%)
- Installing drupal/console-en (1.0.2): Downloading (100%)
- Installing dflydev/placeholder-resolver (v1.0.2): Downloading (100%)
- Installing dflydev/dot-access-data (v1.1.0): Downloading (100%)
- Installing dflydev/dot-access-configuration (v1.0.2): Downloading (100%)
- Installing drupal/console-core (1.0.2): Downloading (100%)
- Installing doctrine/collections (v1.5.0): Downloading (100%)
- Installing doctrine/lexer (v1.0.1): Downloading (100%)
- Installing doctrine/annotations (v1.5.0): Downloading (100%)
- Installing alchemy/zippy (0.4.3): Downloading (100%)
- Installing drupal/console (1.0.2): Downloading (100%)
- Installing zendframework/zend-stdlib (3.1.0): Downloading (100%)
- Installing zendframework/zend-escaper (2.5.2): Downloading (100%)
- Installing zendframework/zend-feed (2.8.0): Downloading (100%)
- Installing zendframework/zend-diactoros (1.6.1): Downloading (100%)
- Installing symfony/validator (v3.2.13): Downloading (100%)
- Installing symfony/serializer (v3.2.13): Downloading (100%)
- Installing symfony/routing (v3.2.13): Downloading (100%)
- Installing symfony/psr-http-message-bridge (v1.0.0): Downloading (100%)
- Installing symfony/polyfill-iconv (v1.6.0): Downloading (100%)
- Installing symfony/http-kernel (v3.2.13): Downloading (100%)
- Installing symfony/class-loader (v3.2.13): Downloading (100%)
- Installing symfony-cmf/routing (1.4.1): Downloading (100%)
- Installing stack/builder (v1.0.4): Downloading (100%)
- Installing masterminds/html5 (2.3.0): Downloading (100%)
- Installing egulias/email-validator (1.2.14): Downloading (100%)
- Installing easyrdf/easyrdf (0.9.1): Downloading (100%)
- Installing doctrine/inflector (v1.2.0): Downloading (100%)
- Installing doctrine/cache (v1.7.1): Downloading (100%)
- Installing doctrine/common (v2.8.1): Downloading (100%)
- Installing composer/semver (1.4.2): Downloading (100%)
- Installing asm89/stack-cors (1.1.0): Downloading (100%)
- Installing drupal/core (8.4.0): Downloading (100%)
- Installing phpdocumentor/reflection-docblock (2.0.5): Downloading (100%)
- Installing pear/console_table (v1.3.0): Downloading (100%)
- Installing consolidation/output-formatters (3.1.12): Downloading (100%)
- Installing consolidation/annotated-command (2.8.1): Downloading (100%)
- Installing drush/drush (8.1.15): Downloading (100%)
- Installing symfony/browser-kit (v3.3.10): Downloading (100%)
- Installing fabpot/goutte (v3.2.1): Loading from cache
- Installing behat/mink (v1.7.1): Downloading (100%)
- Installing behat/mink-browserkit-driver (v1.3.2): Loading from cache
- Installing behat/mink-goutte-driver (v1.2.1): Loading from cache
- Installing jcalderonzumba/gastonjs (v1.0.3): Downloading (100%)
- Installing jcalderonzumba/mink-phantomjs-driver (v0.3.3): Downloading (100%)
- Installing mikey179/vfsstream (v1.6.5): Loading from cache
- Installing sebastian/version (1.0.6): Loading from cache
- Installing sebastian/global-state (1.1.1): Loading from cache
- Installing sebastian/recursion-context (1.0.5): Loading from cache
- Installing sebastian/exporter (1.2.2): Loading from cache
- Installing sebastian/environment (1.3.8): Loading from cache
- Installing sebastian/diff (1.4.3): Downloading (100%)
- Installing sebastian/comparator (1.2.4): Loading from cache
- Installing doctrine/instantiator (1.1.0): Downloading (100%)
- Installing phpunit/php-text-template (1.2.1): Loading from cache
- Installing phpunit/phpunit-mock-objects (2.3.8): Loading from cache
- Installing phpunit/php-timer (1.0.9): Loading from cache
- Installing phpunit/php-file-iterator (1.4.2): Loading from cache
- Installing phpunit/php-token-stream (1.4.11): Loading from cache
- Installing phpunit/php-code-coverage (2.2.4): Loading from cache
- Installing phpspec/prophecy (v1.7.2): Downloading (100%)
- Installing phpunit/phpunit (4.8.36): Loading from cache
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/var-dumper suggests installing ext-symfony_debug ()
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
alchemy/zippy suggests installing guzzle/guzzle (To use the GuzzleTeleporter with Guzzle 3)
zendframework/zend-feed suggests installing zendframework/zend-cache (Zend\Cache component, for optionally caching feeds between requests)
zendframework/zend-feed suggests installing zendframework/zend-db (Zend\Db component, for use with PubSubHubbub)
zendframework/zend-feed suggests installing zendframework/zend-http (Zend\Http for PubSubHubbub, and optionally for use with Zend\Feed\Reader)
zendframework/zend-feed suggests installing zendframework/zend-servicemanager (Zend\ServiceManager component, for easily extending ExtensionManager implementations)
zendframework/zend-feed suggests installing zendframework/zend-validator (Zend\Validator component, for validating email addresses used in Atom feeds and entries ehen using the Writer subcomponent)
symfony/validator suggests installing symfony/intl ()
symfony/serializer suggests installing symfony/property-access (For using the ObjectNormalizer.)
symfony/serializer suggests installing symfony/property-info (To deserialize relations.)
easyrdf/easyrdf suggests installing ml/json-ld (~1.0)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
behat/mink suggests installing behat/mink-selenium2-driver (slow, but JS-enabled driver for any app (requires Selenium2))
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating autoload files
Downloading (100%)Downloading (100%)Downloading (100%)Downloading (100%)Downloading (100%)Downloading (100%)Downloading (connecting.Downloading (100%)Downloading (100%)Downloading (100%)Downloading (100%)Downloading (100%)Downloading (100%)Downloading (connecting.Downloading (100%)Downloading (100%)Downloading (100%)Creating packages services cache file:
/home/zbvabpx/cloudweb2/vendor/drupal/console/extend.console.uninstall.services.yml
> DrupalProject\composer\ScriptHandler::createRequiredFiles
Create a sites/default/settings.php file with chmod 0666
Create a sites/default/files directory with chmod 0777
De cette façon, le code Drupal est dans des sous-dossiers
et drush est installé.
J'ajoute la commande qui me manquait :
**~/composer.phar --profile install**
[8.6MB/0.07s] > DrupalProject\composer\ScriptHandler::checkComposerVersion
[8.9MB/0.08s] Loading composer repositories with package information
[9.3MB/0.08s] Installing dependencies (including require-dev) from lock file
[11.0MB/0.11s] Nothing to install or update
[9.4MB/0.12s] Generating autoload files
[9.9MB/0.23s] Removing packages services cache file:
[9.9MB/0.23s] /home/zbvabpx/cloudweb2/vendor/drupal/console/extend.console.uninstall.services.yml
[9.9MB/0.23s] Creating packages services cache file:
[9.9MB/0.23s] /home/zbvabpx/cloudweb2/vendor/drupal/console/extend.console.uninstall.services.yml
[9.9MB/0.25s] > DrupalProject\composer\ScriptHandler::createRequiredFiles
[10.1MB/0.25s] Memory usage: 10.07MB (peak: 11.58MB), time: 0.25s
Je dois modifier dans le manager OVH pour avoir la racine du site dans
/cloudweb2/web
Le code Drupal est dans le sous-dossier /web
Ensuite je fais la config Drupal DB standard via le web.
Puis je fais l'installation d'un module :
et ça coince !
composer require drupal/pathauto
-bash: composer: command not found
zbvabpx@e82ecb26f949:~/cloudweb2$ ../composer require drupal/pathauto
Using version ^1.0 for drupal/pathauto
./composer.json has been updated
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
- Installing drupal/token (1.0.0): Loading from cache
Installation failed, reverting ./composer.json to its original content.
The following exception is caused by a **lack of memory or swap**, or not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
[ErrorException]
proc_open(): fork failed - **Cannot allocate memory**
... je ne comprend pas comment ce changement de config des dossiers, et l'ajout de certains composants telque Drush, fait que Composer BOUFFE la mémoire comme cela !
bon, je vais essayer de m'adapter à l'autre structure de dossiers (celle que tu as utilisée), qui consomme nettement moins de ram.
Merci. Didier