Learn about Centmin Mod LEMP Stack today
Become a Member

Composer install

Discussion in 'Other Web Apps usage' started by dce, Feb 21, 2018.

  1. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:45 PM
    CentOS 7 64bit
    centmin 123.09beta01
    PHP 5.6.33
    nginx version: nginx/1.13.9
    10.1.31-MariaDB

    I have some legacy drupal 7 sites I am going to host on centmin. Installed from a linode script on a 4gig CentOS provisioned server. Everything went smoothly - firewall, secured SSH etc. Originally installed Php 10+, then recompiled for PHP 5.6.33 after the install.
    When I tried to install drush (before any drupal installs) I got a complaint about composer which did not seem to be installed. I checked documentation and I found one tread on the topic of composer. I did a manual install based on some non-centmin related documentation;
    curl -sS https://getcomposer.org/installer | php;
    then changed into the drush directory and ran: /usr/local/src/centminmod/composer.phar install (edit: I am assuming that composer should not be here, just ended up in the centminmod dir while I was doing some trial and error ...)

    This installed it. Now, before I set up any aliases / paths etc, I can launch the binary by calling drush with its full path.

    Since I am setting up for the first time, I want to make sure I am using proper practices when installing and utilizing composer within the Centmin Mod framework. Does composer usually install with the centmin php install? If it does, how do you force centmin mod to install composer?
    If it has to be installed after the fact, what is the best way to accomplish a composer install that works well with the centmin mod system and drush?


    Regards,
     
    Last edited: Feb 21, 2018
  2. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Centmin Mod doesn't install composer by default as it can use up to 1.5GB of memory by itself ! But here's old Laravel guide install that i whipped up with composer at How to install Laravel?

    Install composer globally

    Code:
    curl -sS https://getcomposer.org/installer | php
    mv composer.phar /usr/local/bin/composer
    
     
  3. MaximilianKohler

    MaximilianKohler Member

    200
    6
    18
    Jun 23, 2023
    Ratings:
    +33
    Local Time:
    7:45 PM
    Yes, I saw this warning here Centmin Mod LEMP Stack Install Nginx on CentOS also. It scared me off from installing it but I had trouble installing an application another way, so I created a test server and installed it there.

    Before:
    Code:
    ===============================================================================
                  total        used        free      shared  buff/cache   available
    Mem:           1789         611         525          36         652         944
    Swap:          1023           0        1023
    ===============================================================================
    
    After:
    Code:
    ===============================================================================
                  total        used        free      shared  buff/cache   available
    Mem:           1789         636         403          36         750         919
    Swap:          1023           0        1023
    ===============================================================================
    
    Am I missing something or is the problem fixed?

    I saw here Troubleshooting - Composer that they say "make sure you are running Composer 2, and if possible 2.2.0 or above", then they also have a blog about improving memory usage: The long journey of making PHP’s Composer memory-efficient and fast

    2.7.2 is what it installed for me:
    Code:
    composer -v
    
      / ____/___  ____ ___  ____  ____  ________  _____
     / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
    / /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
    \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                        /_/
    Composer version 2.7.2 2024-03-11 17:12:18
    
    I'm trying to install this Amazon SES logging/monitoring service Installation — SesDashboard v1.1.0 documentation and their instructions have you run another command that downloads and installs a bunch of other stuff:
    Code:
    composer install
    Installing dependencies from lock file (including require-dev)
    Verifying lock file contents can be installed on current platform.
    Package operations: 143 installs, 0 updates, 0 removals
      - Downloading composer/package-versions-deprecated (1.11.99.4)
      - Downloading symfony/flex (v1.19.3)
      - Downloading symfony/deprecation-contracts (v3.2.0)
      - Downloading psr/container (1.1.2)
      - Downloading symfony/service-contracts (v2.5.2)
      - Downloading symfony/http-client-contracts (v2.5.2)
      - Downloading symfony/polyfill-php80 (v1.27.0)
      - Downloading symfony/polyfill-php73 (v1.27.0)
      - Downloading psr/log (2.0.0)
      - Downloading symfony/http-client (v5.4.16)
      - Downloading psr/cache (2.0.0)
      - Downloading async-aws/core (1.18.0)
      - Downloading symfony/polyfill-mbstring (v1.27.0)
      - Downloading symfony/polyfill-intl-normalizer (v1.27.0)
      - Downloading symfony/polyfill-intl-grapheme (v1.27.0)
      - Downloading symfony/string (v5.4.15)
      - Downloading symfony/console (v5.4.16)
      - Downloading doctrine/deprecations (v1.0.0)
      - Downloading doctrine/event-manager (1.2.0)
      - Downloading doctrine/persistence (3.1.1)
      - Downloading doctrine/lexer (1.2.3)
      - Downloading doctrine/instantiator (1.4.1)
      - Downloading doctrine/inflector (2.0.6)
      - Downloading doctrine/cache (2.2.0)
      - Downloading doctrine/dbal (2.13.9)
      - Downloading doctrine/common (3.4.3)
      - Downloading doctrine/collections (1.8.0)
      - Downloading doctrine/orm (2.13.4)
      - Downloading beberlei/doctrineextensions (v1.3.0)
      - Downloading box/spout (v3.3.0)
      - Downloading symfony/http-foundation (v5.4.16)
      - Downloading psr/event-dispatcher (1.0.0)
      - Downloading symfony/event-dispatcher-contracts (v3.2.0)
      - Downloading symfony/event-dispatcher (v5.4.9)
      - Downloading symfony/var-dumper (v5.4.14)
      - Downloading symfony/error-handler (v5.4.15)
      - Downloading symfony/http-kernel (v5.4.16)
      - Downloading symfony/doctrine-bridge (v5.4.16)
      - Downloading symfony/polyfill-php81 (v1.27.0)
      - Downloading symfony/dependency-injection (v5.4.16)
      - Downloading symfony/filesystem (v5.4.13)
      - Downloading symfony/config (v5.4.11)
      - Downloading symfony/routing (v5.4.15)
      - Downloading symfony/finder (v5.4.11)
      - Downloading symfony/var-exporter (v5.4.10)
      - Downloading symfony/cache-contracts (v2.5.2)
      - Downloading symfony/cache (v5.4.15)
      - Downloading symfony/framework-bundle (v5.4.16)
      - Downloading doctrine/sql-formatter (1.1.3)
      - Downloading doctrine/annotations (1.14.1)
      - Downloading doctrine/doctrine-bundle (2.7.2)
      - Downloading doctrine/data-fixtures (1.5.3)
      - Downloading doctrine/doctrine-fixtures-bundle (3.4.2)
      - Downloading symfony/stopwatch (v5.4.13)
      - Downloading laminas/laminas-code (4.8.0)
      - Downloading friendsofphp/proxy-manager-lts (v1.0.13)
      - Downloading doctrine/migrations (2.3.5)
      - Downloading doctrine/doctrine-migrations-bundle (2.2.3)
      - Downloading twig/twig (v3.4.3)
      - Downloading symfony/translation-contracts (v2.5.2)
      - Downloading symfony/translation (v5.4.14)
      - Downloading knplabs/knp-components (v3.6.0)
      - Downloading knplabs/knp-paginator-bundle (v5.9.0)
      - Downloading webmozart/assert (1.11.0)
      - Downloading phpdocumentor/reflection-common (2.2.0)
      - Downloading phpdocumentor/type-resolver (1.6.2)
      - Downloading phpdocumentor/reflection-docblock (5.3.0)
      - Downloading phpstan/phpdoc-parser (1.15.2)
      - Downloading sebastian/version (3.0.2)
      - Downloading sebastian/type (3.2.0)
      - Downloading sebastian/resource-operations (3.0.3)
      - Downloading sebastian/recursion-context (4.0.4)
      - Downloading sebastian/object-reflector (2.0.4)
      - Downloading sebastian/object-enumerator (4.0.4)
      - Downloading sebastian/global-state (5.0.5)
      - Downloading sebastian/exporter (4.0.5)
      - Downloading sebastian/environment (5.1.4)
      - Downloading sebastian/diff (4.0.4)
      - Downloading sebastian/comparator (4.0.8)
      - Downloading sebastian/code-unit (1.0.8)
      - Downloading sebastian/cli-parser (1.0.1)
      - Downloading phpunit/php-timer (5.0.3)
      - Downloading phpunit/php-text-template (2.0.4)
      - Downloading phpunit/php-invoker (3.1.1)
      - Downloading phpunit/php-file-iterator (3.0.6)
      - Downloading theseer/tokenizer (1.2.1)
      - Downloading nikic/php-parser (v4.15.2)
      - Downloading sebastian/lines-of-code (1.0.3)
      - Downloading sebastian/complexity (2.0.2)
      - Downloading sebastian/code-unit-reverse-lookup (2.0.3)
      - Downloading phpunit/php-code-coverage (9.2.21)
      - Downloading phar-io/version (3.2.1)
      - Downloading phar-io/manifest (2.0.3)
      - Downloading myclabs/deep-copy (1.11.0)
      - Downloading phpunit/phpunit (9.5.27)
      - Downloading sensio/framework-extra-bundle (v5.6.1)
      - Downloading symfony/polyfill-intl-idn (v1.27.0)
      - Downloading symfony/mime (v5.4.16)
      - Downloading egulias/email-validator (3.2.1)
      - Downloading symfony/mailer (v5.4.16)
      - Downloading async-aws/ses (1.5.0)
      - Downloading symfony/amazon-mailer (v5.4.8)
      - Downloading symfony/dom-crawler (v5.4.15)
      - Downloading symfony/browser-kit (v5.4.11)
      - Downloading symfony/css-selector (v5.4.11)
      - Downloading symfony/twig-bridge (v5.4.16)
      - Downloading symfony/debug-bundle (v5.4.11)
      - Downloading symfony/dotenv (v5.4.5)
      - Downloading symfony/expression-language (v5.4.14)
      - Downloading symfony/property-info (v5.4.16)
      - Downloading symfony/property-access (v5.4.15)
      - Downloading symfony/polyfill-intl-icu (v1.27.0)
      - Downloading symfony/options-resolver (v5.4.11)
      - Downloading symfony/form (v5.4.16)
      - Downloading symfony/intl (v5.4.15)
      - Downloading symfony/maker-bundle (v1.48.0)
      - Downloading monolog/monolog (2.8.0)
      - Downloading symfony/monolog-bridge (v5.4.10)
      - Downloading symfony/monolog-bundle (v3.8.0)
      - Downloading symfony/notifier (v5.4.8)
      - Downloading symfony/phpunit-bridge (v6.2.0)
      - Downloading symfony/process (v5.4.11)
      - Downloading symfony/proxy-manager-bridge (v5.4.6)
      - Downloading symfony/password-hasher (v5.4.11)
      - Downloading symfony/security-core (v5.4.15)
      - Downloading symfony/security-http (v5.4.15)
      - Downloading symfony/security-guard (v5.4.13)
      - Downloading symfony/security-csrf (v5.4.11)
      - Downloading symfony/security-bundle (v5.4.11)
      - Downloading symfony/serializer (v5.4.15)
      - Downloading symfony/validator (v5.4.15)
      - Downloading psr/link (1.1.1)
      - Downloading symfony/web-link (v5.4.3)
      - Downloading symfony/twig-bundle (v5.4.8)
      - Downloading symfony/web-profiler-bundle (v5.4.14)
      - Downloading symfony/asset (v5.4.13)
      - Downloading symfony/webpack-encore-bundle (v1.16.0)
      - Downloading symfony/yaml (v5.4.16)
      - Downloading twig/extra-bundle (v3.4.0)
      - Downloading zenstruck/callback (v1.5.0)
      - Downloading zenstruck/assert (v1.2.0)
      - Downloading fakerphp/faker (v1.21.0)
      - Downloading zenstruck/foundry (v1.24.1)
      - Installing composer/package-versions-deprecated (1.11.99.4): Extracting archive
      - Installing symfony/flex (v1.19.3): Extracting archive
      - Installing symfony/deprecation-contracts (v3.2.0): Extracting archive
      - Installing psr/container (1.1.2): Extracting archive
      - Installing symfony/service-contracts (v2.5.2): Extracting archive
      - Installing symfony/http-client-contracts (v2.5.2): Extracting archive
      - Installing symfony/polyfill-php80 (v1.27.0): Extracting archive
      - Installing symfony/polyfill-php73 (v1.27.0): Extracting archive
      - Installing psr/log (2.0.0): Extracting archive
      - Installing symfony/http-client (v5.4.16): Extracting archive
      - Installing psr/cache (2.0.0): Extracting archive
      - Installing async-aws/core (1.18.0): Extracting archive
      - Installing symfony/polyfill-mbstring (v1.27.0): Extracting archive
      - Installing symfony/polyfill-intl-normalizer (v1.27.0): Extracting archive
      - Installing symfony/polyfill-intl-grapheme (v1.27.0): Extracting archive
      - Installing symfony/string (v5.4.15): Extracting archive
      - Installing symfony/console (v5.4.16): Extracting archive
      - Installing doctrine/deprecations (v1.0.0): Extracting archive
      - Installing doctrine/event-manager (1.2.0): Extracting archive
      - Installing doctrine/persistence (3.1.1): Extracting archive
      - Installing doctrine/lexer (1.2.3): Extracting archive
      - Installing doctrine/instantiator (1.4.1): Extracting archive
      - Installing doctrine/inflector (2.0.6): Extracting archive
      - Installing doctrine/cache (2.2.0): Extracting archive
      - Installing doctrine/dbal (2.13.9): Extracting archive
      - Installing doctrine/common (3.4.3): Extracting archive
      - Installing doctrine/collections (1.8.0): Extracting archive
      - Installing doctrine/orm (2.13.4): Extracting archive
      - Installing beberlei/doctrineextensions (v1.3.0): Extracting archive
      - Installing box/spout (v3.3.0): Extracting archive
      - Installing symfony/http-foundation (v5.4.16): Extracting archive
      - Installing psr/event-dispatcher (1.0.0): Extracting archive
      - Installing symfony/event-dispatcher-contracts (v3.2.0): Extracting archive
      - Installing symfony/event-dispatcher (v5.4.9): Extracting archive
      - Installing symfony/var-dumper (v5.4.14): Extracting archive
      - Installing symfony/error-handler (v5.4.15): Extracting archive
      - Installing symfony/http-kernel (v5.4.16): Extracting archive
      - Installing symfony/doctrine-bridge (v5.4.16): Extracting archive
      - Installing symfony/polyfill-php81 (v1.27.0): Extracting archive
      - Installing symfony/dependency-injection (v5.4.16): Extracting archive
      - Installing symfony/filesystem (v5.4.13): Extracting archive
      - Installing symfony/config (v5.4.11): Extracting archive
      - Installing symfony/routing (v5.4.15): Extracting archive
      - Installing symfony/finder (v5.4.11): Extracting archive
      - Installing symfony/var-exporter (v5.4.10): Extracting archive
      - Installing symfony/cache-contracts (v2.5.2): Extracting archive
      - Installing symfony/cache (v5.4.15): Extracting archive
      - Installing symfony/framework-bundle (v5.4.16): Extracting archive
      - Installing doctrine/sql-formatter (1.1.3): Extracting archive
      - Installing doctrine/annotations (1.14.1): Extracting archive
      - Installing doctrine/doctrine-bundle (2.7.2): Extracting archive
      - Installing doctrine/data-fixtures (1.5.3): Extracting archive
      - Installing doctrine/doctrine-fixtures-bundle (3.4.2): Extracting archive
      - Installing symfony/stopwatch (v5.4.13): Extracting archive
      - Installing laminas/laminas-code (4.8.0): Extracting archive
      - Installing friendsofphp/proxy-manager-lts (v1.0.13): Extracting archive
      - Installing doctrine/migrations (2.3.5): Extracting archive
      - Installing doctrine/doctrine-migrations-bundle (2.2.3): Extracting archive
      - Installing twig/twig (v3.4.3): Extracting archive
      - Installing symfony/translation-contracts (v2.5.2): Extracting archive
      - Installing symfony/translation (v5.4.14): Extracting archive
      - Installing knplabs/knp-components (v3.6.0): Extracting archive
      - Installing knplabs/knp-paginator-bundle (v5.9.0): Extracting archive
      - Installing webmozart/assert (1.11.0): Extracting archive
      - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
      - Installing phpdocumentor/type-resolver (1.6.2): Extracting archive
      - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive
      - Installing phpstan/phpdoc-parser (1.15.2): Extracting archive
      - Installing sebastian/version (3.0.2): Extracting archive
      - Installing sebastian/type (3.2.0): Extracting archive
      - Installing sebastian/resource-operations (3.0.3): Extracting archive
      - Installing sebastian/recursion-context (4.0.4): Extracting archive
      - Installing sebastian/object-reflector (2.0.4): Extracting archive
      - Installing sebastian/object-enumerator (4.0.4): Extracting archive
      - Installing sebastian/global-state (5.0.5): Extracting archive
      - Installing sebastian/exporter (4.0.5): Extracting archive
      - Installing sebastian/environment (5.1.4): Extracting archive
      - Installing sebastian/diff (4.0.4): Extracting archive
      - Installing sebastian/comparator (4.0.8): Extracting archive
      - Installing sebastian/code-unit (1.0.8): Extracting archive
      - Installing sebastian/cli-parser (1.0.1): Extracting archive
      - Installing phpunit/php-timer (5.0.3): Extracting archive
      - Installing phpunit/php-text-template (2.0.4): Extracting archive
      - Installing phpunit/php-invoker (3.1.1): Extracting archive
      - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
      - Installing theseer/tokenizer (1.2.1): Extracting archive
      - Installing nikic/php-parser (v4.15.2): Extracting archive
      - Installing sebastian/lines-of-code (1.0.3): Extracting archive
      - Installing sebastian/complexity (2.0.2): Extracting archive
      - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
      - Installing phpunit/php-code-coverage (9.2.21): Extracting archive
      - Installing phar-io/version (3.2.1): Extracting archive
      - Installing phar-io/manifest (2.0.3): Extracting archive
      - Installing myclabs/deep-copy (1.11.0): Extracting archive
      - Installing phpunit/phpunit (9.5.27): Extracting archive
      - Installing sensio/framework-extra-bundle (v5.6.1): Extracting archive
      - Installing symfony/polyfill-intl-idn (v1.27.0): Extracting archive
      - Installing symfony/mime (v5.4.16): Extracting archive
      - Installing egulias/email-validator (3.2.1): Extracting archive
      - Installing symfony/mailer (v5.4.16): Extracting archive
      - Installing async-aws/ses (1.5.0): Extracting archive
      - Installing symfony/amazon-mailer (v5.4.8): Extracting archive
      - Installing symfony/dom-crawler (v5.4.15): Extracting archive
      - Installing symfony/browser-kit (v5.4.11): Extracting archive
      - Installing symfony/css-selector (v5.4.11): Extracting archive
      - Installing symfony/twig-bridge (v5.4.16): Extracting archive
      - Installing symfony/debug-bundle (v5.4.11): Extracting archive
      - Installing symfony/dotenv (v5.4.5): Extracting archive
      - Installing symfony/expression-language (v5.4.14): Extracting archive
      - Installing symfony/property-info (v5.4.16): Extracting archive
      - Installing symfony/property-access (v5.4.15): Extracting archive
      - Installing symfony/polyfill-intl-icu (v1.27.0): Extracting archive
      - Installing symfony/options-resolver (v5.4.11): Extracting archive
      - Installing symfony/form (v5.4.16): Extracting archive
      - Installing symfony/intl (v5.4.15): Extracting archive
      - Installing symfony/maker-bundle (v1.48.0): Extracting archive
      - Installing monolog/monolog (2.8.0): Extracting archive
      - Installing symfony/monolog-bridge (v5.4.10): Extracting archive
      - Installing symfony/monolog-bundle (v3.8.0): Extracting archive
      - Installing symfony/notifier (v5.4.8): Extracting archive
      - Installing symfony/phpunit-bridge (v6.2.0): Extracting archive
      - Installing symfony/process (v5.4.11): Extracting archive
      - Installing symfony/proxy-manager-bridge (v5.4.6): Extracting archive
      - Installing symfony/password-hasher (v5.4.11): Extracting archive
      - Installing symfony/security-core (v5.4.15): Extracting archive
      - Installing symfony/security-http (v5.4.15): Extracting archive
      - Installing symfony/security-guard (v5.4.13): Extracting archive
      - Installing symfony/security-csrf (v5.4.11): Extracting archive
      - Installing symfony/security-bundle (v5.4.11): Extracting archive
      - Installing symfony/serializer (v5.4.15): Extracting archive
      - Installing symfony/validator (v5.4.15): Extracting archive
      - Installing psr/link (1.1.1): Extracting archive
      - Installing symfony/web-link (v5.4.3): Extracting archive
      - Installing symfony/twig-bundle (v5.4.8): Extracting archive
      - Installing symfony/web-profiler-bundle (v5.4.14): Extracting archive
      - Installing symfony/asset (v5.4.13): Extracting archive
      - Installing symfony/webpack-encore-bundle (v1.16.0): Extracting archive
      - Installing symfony/yaml (v5.4.16): Extracting archive
      - Installing twig/extra-bundle (v3.4.0): Extracting archive
      - Installing zenstruck/callback (v1.5.0): Extracting archive
      - Installing zenstruck/assert (v1.2.0): Extracting archive
      - Installing fakerphp/faker (v1.21.0): Extracting archive
      - Installing zenstruck/foundry (v1.24.1): Extracting archive
    Package box/spout is abandoned, you should avoid using it. No replacement was suggested.
    Package sensio/framework-extra-bundle is abandoned, you should avoid using it. Use Symfony instead.
    Generating autoload files
    119 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    
    Run composer recipes at any time to see the status of your Symfony recipes.
    
    Executing script cache:clear [OK]
    Executing script assets:install public [OK]
    
    And even after that, there was little change:
    Code:
    ===============================================================================
                  total        used        free      shared  buff/cache   available
    Mem:           1789         638         248          36         902         906
    Swap:          4095           0        4095
    ===============================================================================
    
    Just more going into the buff/cache, but available is the same.
     
    Last edited: Mar 29, 2024
  4. eva2000

    eva2000 Administrator Staff Member

    54,546
    12,221
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,790
    Local Time:
    1:45 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Composer memory usage is when is ran not at idle so free command won't show it
     
  5. MaximilianKohler

    MaximilianKohler Member

    200
    6
    18
    Jun 23, 2023
    Ratings:
    +33
    Local Time:
    7:45 PM
    So as long as I'm not running Composer commands often I don't need to worry about it? Or are the things I install with Composer going to be running composer commands themselves in the background? And if I do run into a problem I can just increase the swap space?