5.2Composer(PHP依赖关系管理工具)的安装步骤(openSUSE Tumbleweed)

sudo zypper in php8-phar
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
sudo mv composer.phar /usr/local/bin/composer
composer --version
composer self-update
//所有项目都会使用该镜像地址
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
//取消全局配置
composer config -g --unset repos.packagist

原创文章,作者:huoxiaoqiang,如若转载,请注明出处:https://www.huoxiaoqiang.com/back/php/3413.html

发表评论

登录后才能评论