原来的dobdeb对于jessie等都不再支持7.2了,所以新的7.2只能从sury上进行获取
执行:
XML/HTML代码
- #!/bin/bash
- # To add this repository please do:
- if [ "$(whoami)" != "root" ]; then
- SUDO=sudo
- fi
- ${SUDO} apt-get -y install apt-transport-https lsb-release ca-certificates
- ${SUDO} wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
- ${SUDO} sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
- ${SUDO} apt-get update
记不住没关系,打开网址:https://packages.sury.org/php/,就有Readme了。复制粘贴运行一下就行!