Cách downgrade/upgrade php version trong centos 7

Cách downgrade/upgrade php version trong centos 7

Ví dụ: trên centos 7 của bạn đang cài version 7.4 và muốn downgrade xuống version 7.2

1. Remove php version 7.4

yum remove "php-*" -y

Khi run lệnh trên, hệ thống sẽ tự động remove tất cả các package, sau khi hoàn thành remove thì sang bước 2

2. Install php version 7.2

yum --disablerepo=remi-php74 --enablerepo=remi-php72 install php php-gd php-mbstring php-mysql php-curl php-mcrypt

sau khi install thành công, kiểm tra lại version

php -v

xuất hiện text sau là thành công

PHP 7.2.28 (cli) (built: Feb 18 2020 11:07:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Với upgrade thì mọi người làm tương tự như trên là được.
OK, Chúc mọi người thành công!

Post a comment

Your email address will not be published.