centos7系统php7.2安装composer依赖

本文介绍了如何在CentOS7系统上安装PHP7.2并配置Composer。首先通过wget下载composer的安装脚本,然后切换到apache用户,进入网站根目录执行安装。过程中提示缺少'unzip'命令,建议安装'unzip'以避免解压问题。安装过程中显示了多个依赖包的下载和安装过程,并警告有些包已被弃用,但最终成功安装了phpunit/phpunit等依赖。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

centos7系统php7.2安装composer依赖
1.安装composer
# wget https://install.phpcomposer.com/installer
mv installer composer-setup.php
# 执行download下载composer工具
php composer-setup.php
2.切换到apache用户和系统根目录,安装相关的依赖,会在根目录下生成vendor文件夹

su apache
cd /data/www/vhosts/demoair-api.chinasoft.com/httpdocs

[/vhosts/demoair-api.chinasoft.com/httpdocs]$ composer.phar install
As there is no 'unzip' command installed zip files are being unpacked using the PHP zip extension.
This may cause invalid reports of corrupted archives. Besides, any UNIX permissions (e.g. executable) defined in the archives will be lost.
Installing 'unzip' may remediate them.
  - Downloading doctrine/inflector (2.0.3)
  - Downloading doctrine/lexer (1.2.1)
  - Downloading symfony/polyfill-php80 (v1.20.0)
 ...
 ...
  - Installing phar-io/manifest (1.0.3): Extracting archive
  - Installing myclabs/deep-copy (1.10.2): Extracting archive
  - Installing phpunit/phpunit (8.5.9): Extracting archive
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Generating optimized autoload files
46 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值