[英]how to upgrade from php 7.0 to php 7.3 on Debian 9.1
I have a Debian 9.1 droplet on DigitalOcean.我在 DigitalOcean 上有一个 Debian 9.1 droplet。 1GB Memory, 30GB Disk. 1GB Memory,30GB 磁盘。
I've previously installed php 7.0 using apt install php php-fpm
我之前使用apt install php php-fpm
安装了 php 7.0
I also ran the following commands to install php modules: apt-get install php-mysql
apt-get install php-curl
apt-get install php-zip
apt-get install php-apcu
apt-get install php-xml
我还运行了以下命令来安装 php 模块: apt-get install php-mysql
apt-get install php-curl
apt-get install php-zip
apt-get install php-apcu
apt-get install php-xml
How do I now upgrade from 7.0 to 7.3?我现在如何从 7.0 升级到 7.3?
Just to give you an idea of how you can do it:只是为了让您了解如何做到这一点:
Basically, you need to follow two steps:基本上,您需要执行两个步骤:
Install the 7.3
version as you did for 7.0
(you can pass the version number to install the exact version number)像安装7.0
一样安装7.3
版本(您可以传递版本号以安装确切的版本号)
You need to configure your PHP CLI to use the new version 7.3
instead of 7.0
.您需要将 PHP CLI 配置为使用新版本7.3
而不是7.0
。
The above steps can be done for every version.每个版本都可以执行上述步骤。
Here is documentation of how you can do it in case of migration from 7 to 8
. 这是有关从7 to 8
的情况下如何执行此操作的文档。
NOTE: The documentation will help you to install a version of PHP and configure CLI so you need to make sure to do the updates as per 7.3
.注意:该文档将帮助您安装 PHP 版本并配置 CLI,因此您需要确保按照7.3
进行更新。
sudo-apt update
sudo apt-get install php-fpm
This will go try to update it if see you already have php-fpm... Your repository should be updated to understand there is new version of php that is available for download这将 go 如果看到你已经有 php-fpm 尝试更新它......你的存储库应该更新以了解有新版本的 php 可供下载
you can also remove
& purge
it and try to download it again...您也可以remove
并purge
它并尝试再次下载...
but also consider some services needs to be updated and set to use last version of php that is currently installed... Like Nginx,in that you should update for.conf file to read php 7.3 or any installed versions但也要考虑一些服务需要更新并设置为使用当前安装的 php 的最新版本...例如 Nginx,因为您应该更新 for.conf 文件以读取 php 7.3 或任何已安装的版本
you can also check how many versions php do you have by going to directory by this command cd /etc/php
and do ls
您还可以通过此命令cd /etc/php
转到目录并执行ls
来检查您有多少版本 php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.