Install PHP Composer on Ubuntu: Difference between revisions
From WikiMLT
m Стадий: 4 [Фаза:Авторизиране, Статус:Разработен]; Категория:PHP |
m Стадий: 5 [Фаза:Утвърждаване, Статус:Авторизиран]; Категория:PHP |
||
Line 31: | Line 31: | ||
| Прндл = PHP | | Прндл = PHP | ||
| Прндл1 = Linux Server | | Прндл1 = Linux Server | ||
| Стадий = | | Стадий = 5 | ||
| Фаза = | | Фаза = Утвърждаване | ||
| Статус = | | Статус = Авторизиран | ||
| ИдтПт = Spas | | ИдтПт = Spas | ||
| РзбПт = Spas | | РзбПт = Spas | ||
| АвтПт = {{REVISIONUSER}} | | АвтПт = Spas | ||
| УтвПт = {{REVISIONUSER}} | |||
| ИдтДт = 28.07.2022 | | ИдтДт = 28.07.2022 | ||
| РзбДт = 28.07.2022 | | РзбДт = 28.07.2022 | ||
| АвтДт = {{Today}} | | АвтДт = 28.07.2022 | ||
| УтвДт = {{Today}} | |||
| ИдтРв = [[Special:Permalink/29556|29556]] | | ИдтРв = [[Special:Permalink/29556|29556]] | ||
| РзбРв = [[Special:Permalink/29561|29561]] | | РзбРв = [[Special:Permalink/29561|29561]] | ||
| АвтРв = {{REVISIONID}} | | АвтРв = [[Special:Permalink/29562|29562]] | ||
| УтвРв = {{REVISIONID}} | |||
}} | }} | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Revision as of 23:34, 27 July 2022
Install Composer via Apt
sudo apt update && \
sudo apt install composer
Depending on the version of the OS the Composer's version could be relatively old.
Install the latest version of Composer manually
sudo apt update
sudo apt install php-cli unzip
cd ~/tmp && \
curl -sS https://getcomposer.org/installer -o composer-setup.php && \
HASH=$(curl -sS https://composer.github.io/installer.sig) && \
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
composer -V
References
- Digital Ocean: How To Install Composer on Ubuntu 20.04 [Quick-start]
- Digital Ocean: How To Install and Use Composer on Ubuntu 20.04