ispconfig install Composer

  • Using command line and root login
  • Confirm which user needs to install composer.
  • For example user is ‘web66’
  • Modify /etc/passwd, search web66, change /bin/false to /bin/bash
web66:x:1048:1014::/var/www/clients/client26/web66:/bin/false
{change to}
web66:x:1048:1014::/var/www/clients/client26/web66:/bin/bash
  • chattr -i <Web Directory>
chattr -i /var/www/clients/client26/web66
  • change folder permission
chown web66 /var/www/clients/client26/web66
  • login to web66
su - web66
cd web
  • Download composer-setup.php and install
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  • Check the download file
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  • Install
php composer-setup.php
  • Delete install file
php -r "unlink('composer-setup.php');"
  • composer version check
composer -V
  • composer package install test
composer require monolog/monolog
  • composer update
composer update
  • Exit to root user
exit
  • chattr +i <Web Directory>
chattr +i /var/www/clients/client26/web66
  • Complete