Centos 7에서 PHP를 5.4.16에서 >= PHP 5.6.5/PHP 7로 업그레이드하는 방법은 무엇입니까?

Centos 7에서 PHP를 5.4.16에서 >= PHP 5.6.5/PHP 7로 업그레이드하는 방법은 무엇입니까?

저는 PHP 5.4.16과 함께 제공되는 centos 7을 사용하고 있습니다. 이제 최소한 PHP 5.6.5가 필요한 무들 무들 3.2를 설치해야 합니다.

remi 및 IUS 저장소에서 PHP 설치를 시도했지만 성공하지 못했습니다. 내가 얻는 것은 오류입니다: 이전 설치와 충돌합니다.

다른 버전의 PHP를 설치하면 phpmyadmin이 작동하지 않습니다. (개발서버에서 시도했지만 성공하지 못했습니다)

그런데, 인터넷 검색을 많이 시도했지만 결국에는 작동하는 솔루션을 찾지 못했습니다. 그래서 이걸 만들어야 했어요.

내 서버에서 무들과 phpmyadmin을 모두 작동하게 하려면 어떻게 해야 합니까?

어떤 도움이라도 대단히 감사하겠습니다.

아래를 확인해 주세요

[root@intranet ~]# yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.ehost.vn
 * epel: mirror.lzu.edu.cn
 * extras: centos.excellmedia.net
 * ius: mirror.amsiohosting.net
 * remi-safe: mirror.veriteknik.net.tr
 * updates: mirror.tadu.vn
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56u.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-cli(x86-64) = 5.6.29-1.ius.centos7 for package: php56u-5.6.29-1.ius.centos7.x86_64
--> Processing Dependency: php56u-common(x86-64) = 5.6.29-1.ius.centos7 for package: php56u-5.6.29-1.ius.centos7.x86_64
---> Package php56u-bcmath.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-devel.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-pecl-jsonc-devel(x86-64) for package: php56u-devel-5.6.29-1.ius.centos7.x86_64
---> Package php56u-gd.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-intl.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-mbstring.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-mcrypt.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-mysqlnd.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-pdo(x86-64) = 5.6.29-1.ius.centos7 for package: php56u-mysqlnd-5.6.29-1.ius.centos7.x86_64
---> Package php56u-opcache.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-xml.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Running transaction check
---> Package php56u-cli.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-common.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-pecl-jsonc(x86-64) for package: php56u-common-5.6.29-1.ius.centos7.x86_64
---> Package php56u-pdo.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-pecl-jsonc-devel.x86_64 0:1.3.10-2.ius.centos7 will be installed
--> Running transaction check
---> Package php56u-pecl-jsonc.x86_64 0:1.3.10-2.ius.centos7 will be installed
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Running transaction check
---> Package php56u-pear.noarch 1:1.10.1-4.ius.centos7 will be installed
--> Processing Dependency: php56u-posix for package: 1:php56u-pear-1.10.1-4.ius.centos7.noarch
--> Running transaction check
---> Package php56u-process.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Conflict: php-mysql-5.4.16-42.el7.x86_64 conflicts php-mysqlnd
--> Processing Conflict: php56u-process-5.6.29-1.ius.centos7.x86_64 conflicts php-process < 5.6
--> Processing Conflict: php56u-gd-5.6.29-1.ius.centos7.x86_64 conflicts php-gd < 5.6
--> Processing Conflict: php56u-bcmath-5.6.29-1.ius.centos7.x86_64 conflicts php-bcmath < 5.6
--> Processing Conflict: php56u-common-5.6.29-1.ius.centos7.x86_64 conflicts php-common < 5.6
--> Processing Conflict: php56u-cli-5.6.29-1.ius.centos7.x86_64 conflicts php-cli < 5.6
--> Processing Conflict: php56u-xml-5.6.29-1.ius.centos7.x86_64 conflicts php-xml < 5.6
--> Processing Conflict: php56u-5.6.29-1.ius.centos7.x86_64 conflicts php < 5.6
--> Processing Conflict: php56u-pdo-5.6.29-1.ius.centos7.x86_64 conflicts php-pdo < 5.6
--> Processing Conflict: php56u-mysqlnd-5.6.29-1.ius.centos7.x86_64 conflicts php-mysql < 5.6
--> Processing Conflict: php56u-mbstring-5.6.29-1.ius.centos7.x86_64 conflicts php-mbstring < 5.6
--> Finished Dependency Resolution
Error: php56u-bcmath conflicts with php-bcmath-5.4.16-42.el7.x86_64
Error: php56u-mbstring conflicts with php-mbstring-5.4.16-42.el7.x86_64
Error: php56u-gd conflicts with php-gd-5.4.16-42.el7.x86_64
Error: php56u conflicts with php-5.4.16-42.el7.x86_64
Error: php-mysql conflicts with php56u-mysqlnd-5.6.29-1.ius.centos7.x86_64
Error: php56u-mysqlnd conflicts with php-mysql-5.4.16-42.el7.x86_64
Error: php56u-process conflicts with php-process-5.4.16-42.el7.x86_64
Error: php56u-xml conflicts with php-xml-5.4.16-42.el7.x86_64
Error: php56u-pdo conflicts with php-pdo-5.4.16-42.el7.x86_64
Error: php56u-cli conflicts with php-cli-5.4.16-42.el7.x86_64
Error: php56u-common conflicts with php-common-5.4.16-42.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

답변1

간단한 안내가 있어요Mirena 사용자 가이드. 즉, 다음을 시도해 볼 수 있습니다.

yum install yum-plugin-replace
yum replace php --replace-with php56u

답변2

1 단계

CentOS/RHEL 7.x:

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

CentOS/RHEL 6.x:

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

2 단계

이제 다음을 수행하여 opcode 캐싱이 포함된 PHP 5.6을 설치할 수 있습니다.

yum install php56w php56w-opcache

단계: 3

다음을 통해 PHP를 업그레이드할 수 있습니다.

yum install yum-plugin-replace

yum replace --enablerepo=webtatic-testing php-common --replace-with=php56w-common

관련 정보