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を必要とするMoodle Moodle 3.2をインストールする必要があります。

remiとIUSリポジトリからPHPをインストールしようとしましたが、成功しませんでした。私が得るのはエラーです:以前のインストールと競合しています。

異なるバージョンのPHPをインストールすると、phpmyadminは機能しません。 (開発サーバーで試しましたが成功しませんでした)

ところで、インターネット検索をたくさん試しましたが、最終的にはうまくいく解決策が見つかりませんでした。それでこれを作らなければなりませんでした。

私のサーバーでMoodleと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

おすすめ記事