Como atualizar o PHP de 5.4.16 para = PHP 5.6.5 / PHP 7 no Centos 7?

2

Estou usando o centos 7 e ele veio com o php 5.4.16. Agora eu tenho que instalar o moodle moodle 3.2, que requer pelo menos PHP 5.6.5.

Eu tentei instalar o php de repositórios remi e IUS, mas sem sorte. Tudo o que eu recebo é erro: conflito com a instalação anterior.

Se eu instalar qualquer outra versão do phpmyadmin, o phpmyadmin não funcionará. (Eu tentei no servidor de desenvolvimento não funcionou)

Pela maneira que eu tentei googling muito..mas acabou com não trabalhar soluções. Então eu tive que criar isso.

Como faço para que o moodle e o phpmyadmin funcionem no meu servidor?

Qualquer ajuda é muito apreciada.

Por favor, verifique abaixo

[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
    
por Vamshi 24.01.2017 / 07:21

2 respostas

1

Existe um breve guia IUS Usage Guide . Em suma, você pode tentar seguir:

yum install yum-plugin-replace
yum replace php --replace-with php56u
    
por 24.01.2017 / 09:00
0

passo: 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

passo: 2

Agora você pode instalar o PHP 5.6 com um cache opcode fazendo:

yum install php56w php56w-opcache

passo: 3

você pode atualizar o PHP por:

yum install yum-plugin-replace

yum replace --enablerepo=webtatic-testing php-common --replace-with=php56w-common
    
por 04.05.2018 / 10:21