2019年5月

1 复制源文件备份

cp /etc/apt/sources.list /etc/apt/sources.list.bak

2 设置源文件为空文件

cp /dev/null /etc/apt/sources.list

3 编辑源文件内容为阿里源

vi /etc/apt/sources.list

复制并保存以下内容

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

全局配置切换为阿里云 Composer 国内镜像

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

华为云 镜像(推荐)

composer config -g repo.packagist composer https://mirrors.huaweicloud.com/repository/php/

腾讯云 镜像

composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/

Packagist 中国全量镜像

composer config -g repo.packagist composer https://packagist.phpcomposer.com

Composer 多进程并行下载依赖包,安装prestissimo扩展包即可。

composer global require hirak/prestissimo