Upgrade do php 7.2 para 7.3 no CentOS 7
Desabilite o repositório do php 7.2
1 |
yum-config-manager --disable remi-php72 |
Agora habilite o repositório do php 7.3
1 |
yum-config-manager --enable remi-php73 |
Feito isto, basta fazer um update
1 |
yum update |
O PHP será atualizado da versão 7.2 para a versão 7.3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: mirror.uic.edu * remi-php73: mirror.team-cymru.com * remi-safe: mirror.team-cymru.com * webtatic: us-east.repo.webtatic.com remi-php73 | 3.0 kB 00:00:00 remi-php73/primary_db | 201 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package php.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-cli.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-cli.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-common.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-common.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-gd.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-gd.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-json.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-json.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-ldap.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-ldap.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-mbstring.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-mbstring.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-mysqlnd.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-mysqlnd.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-pdo.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-pdo.x86_64 0:7.3.9-1.el7.remi will be an update ---> Package php-pecl-mcrypt.x86_64 0:1.0.2-2.el7.remi.7.2 will be updated ---> Package php-pecl-mcrypt.x86_64 0:1.0.2-2.el7.remi.7.3 will be an update ---> Package php-xml.x86_64 0:7.2.22-1.el7.remi will be updated ---> Package php-xml.x86_64 0:7.3.9-1.el7.remi will be an update --> Finished Dependency Resolution Dependencies Resolved =============================================================================================== Package Arch Version Repository Size =============================================================================================== Updating: php x86_64 7.3.9-1.el7.remi remi-php73 3.2 M php-cli x86_64 7.3.9-1.el7.remi remi-php73 4.9 M php-common x86_64 7.3.9-1.el7.remi remi-php73 1.1 M php-gd x86_64 7.3.9-1.el7.remi remi-php73 80 k php-json x86_64 7.3.9-1.el7.remi remi-php73 65 k php-ldap x86_64 7.3.9-1.el7.remi remi-php73 82 k php-mbstring x86_64 7.3.9-1.el7.remi remi-php73 510 k php-mysqlnd x86_64 7.3.9-1.el7.remi remi-php73 233 k php-pdo x86_64 7.3.9-1.el7.remi remi-php73 127 k php-pecl-mcrypt x86_64 1.0.2-2.el7.remi.7.3 remi-php73 29 k php-xml x86_64 7.3.9-1.el7.remi remi-php73 207 k Transaction Summary =============================================================================================== Upgrade 11 Packages Total download size: 11 M Is this ok [y/d/N]: y Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/11): php-7.3.9-1.el7.remi.x86_64.rpm | 3.2 MB 00:00:00 (2/11): php-cli-7.3.9-1.el7.remi.x86_64.rpm | 4.9 MB 00:00:00 (3/11): php-common-7.3.9-1.el7.remi.x86_64.rpm | 1.1 MB 00:00:00 (4/11): php-gd-7.3.9-1.el7.remi.x86_64.rpm | 80 kB 00:00:00 (5/11): php-json-7.3.9-1.el7.remi.x86_64.rpm | 65 kB 00:00:00 (6/11): php-ldap-7.3.9-1.el7.remi.x86_64.rpm | 82 kB 00:00:00 (7/11): php-mysqlnd-7.3.9-1.el7.remi.x86_64.rpm | 233 kB 00:00:00 (8/11): php-mbstring-7.3.9-1.el7.remi.x86_64.rpm | 510 kB 00:00:00 (9/11): php-pdo-7.3.9-1.el7.remi.x86_64.rpm | 127 kB 00:00:00 (10/11): php-xml-7.3.9-1.el7.remi.x86_64.rpm | 207 kB 00:00:00 (11/11): php-pecl-mcrypt-1.0.2-2.el7.remi.7.3.x86_64.rpm | 29 kB 00:00:00 ----------------------------------------------------------------------------------------------- Total 17 MB/s | 11 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Updating : php-json-7.3.9-1.el7.remi.x86_64 1/22 Updating : php-common-7.3.9-1.el7.remi.x86_64 2/22 warning: /etc/php.ini created as /etc/php.ini.rpmnew Updating : php-cli-7.3.9-1.el7.remi.x86_64 3/22 Updating : php-pdo-7.3.9-1.el7.remi.x86_64 4/22 Updating : php-mysqlnd-7.3.9-1.el7.remi.x86_64 5/22 Updating : php-7.3.9-1.el7.remi.x86_64 6/22 Updating : php-xml-7.3.9-1.el7.remi.x86_64 7/22 Updating : php-ldap-7.3.9-1.el7.remi.x86_64 8/22 Updating : php-mbstring-7.3.9-1.el7.remi.x86_64 9/22 Updating : php-pecl-mcrypt-1.0.2-2.el7.remi.7.3.x86_64 10/22 Updating : php-gd-7.3.9-1.el7.remi.x86_64 11/22 Cleanup : php-7.2.22-1.el7.remi.x86_64 12/22 Cleanup : php-cli-7.2.22-1.el7.remi.x86_64 13/22 Cleanup : php-mysqlnd-7.2.22-1.el7.remi.x86_64 14/22 Cleanup : php-pdo-7.2.22-1.el7.remi.x86_64 15/22 Cleanup : php-gd-7.2.22-1.el7.remi.x86_64 16/22 Cleanup : php-pecl-mcrypt-1.0.2-2.el7.remi.7.2.x86_64 17/22 Cleanup : php-mbstring-7.2.22-1.el7.remi.x86_64 18/22 Cleanup : php-ldap-7.2.22-1.el7.remi.x86_64 19/22 Cleanup : php-xml-7.2.22-1.el7.remi.x86_64 20/22 Cleanup : php-json-7.2.22-1.el7.remi.x86_64 21/22 Cleanup : php-common-7.2.22-1.el7.remi.x86_64 22/22 Verifying : php-xml-7.3.9-1.el7.remi.x86_64 1/22 Verifying : php-ldap-7.3.9-1.el7.remi.x86_64 2/22 Verifying : php-common-7.3.9-1.el7.remi.x86_64 3/22 Verifying : php-cli-7.3.9-1.el7.remi.x86_64 4/22 Verifying : php-mbstring-7.3.9-1.el7.remi.x86_64 5/22 Verifying : php-7.3.9-1.el7.remi.x86_64 6/22 Verifying : php-pecl-mcrypt-1.0.2-2.el7.remi.7.3.x86_64 7/22 Verifying : php-pdo-7.3.9-1.el7.remi.x86_64 8/22 Verifying : php-json-7.3.9-1.el7.remi.x86_64 9/22 Verifying : php-gd-7.3.9-1.el7.remi.x86_64 10/22 Verifying : php-mysqlnd-7.3.9-1.el7.remi.x86_64 11/22 Verifying : php-gd-7.2.22-1.el7.remi.x86_64 12/22 Verifying : php-cli-7.2.22-1.el7.remi.x86_64 13/22 Verifying : php-pdo-7.2.22-1.el7.remi.x86_64 14/22 Verifying : php-pecl-mcrypt-1.0.2-2.el7.remi.7.2.x86_64 15/22 Verifying : php-common-7.2.22-1.el7.remi.x86_64 16/22 Verifying : php-ldap-7.2.22-1.el7.remi.x86_64 17/22 Verifying : php-xml-7.2.22-1.el7.remi.x86_64 18/22 Verifying : php-7.2.22-1.el7.remi.x86_64 19/22 Verifying : php-mysqlnd-7.2.22-1.el7.remi.x86_64 20/22 Verifying : php-json-7.2.22-1.el7.remi.x86_64 21/22 Verifying : php-mbstring-7.2.22-1.el7.remi.x86_64 22/22 Updated: php.x86_64 0:7.3.9-1.el7.remi php-cli.x86_64 0:7.3.9-1.el7.remi php-common.x86_64 0:7.3.9-1.el7.remi php-gd.x86_64 0:7.3.9-1.el7.remi php-json.x86_64 0:7.3.9-1.el7.remi php-ldap.x86_64 0:7.3.9-1.el7.remi php-mbstring.x86_64 0:7.3.9-1.el7.remi php-mysqlnd.x86_64 0:7.3.9-1.el7.remi php-pdo.x86_64 0:7.3.9-1.el7.remi php-pecl-mcrypt.x86_64 0:1.0.2-2.el7.remi.7.3 php-xml.x86_64 0:7.3.9-1.el7.remi Complete! |
Ao final verifique a versão com o php -v e reinicie o apache para a nova versão ser usada.
Upgrade do PHP 5.3.3 para o 5.4.4 no CentOS 6
Quem precisa fazer este upgrade, não vai conseguir fazer apenas com o yum upgrade php. Abaixo seguem os comandos em sequencia que vão permitir que você atualize o php para a versão 5.4.4
1 2 3 4 5 |
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6*.rpm yum --enablerepo=remi upgrade php-mysql php-devel php-gd php-pecl-memcache php-pspell php-snmp php-xmlrpc php-xml |
Depois de fazer este upgrade, você deve entrar no PHP.ini que fica em /etc/ e configurar a variável date.timezone = America/Sao_Paulo […]
Instalando o Apache e PHP no CentOS 6
Dicas rápidas de como instalar o Apache e o PHP em um CentOS 6.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
-- Instalando o Apache via Yum # yum install httpd -- Colocando o apache para iniciar no boot # chkconfig --levels 235 httpd on -- Iniciando o apache # service httpd start -- Instalando o PHP # yum install php -- Reiniciando o Apache # service httpd restart |
Pronto! Agora você tem o apache e o php instalados.