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.
Testar velocidade do link de Internet de um servidor linux
Algumas vezes é necessário saber como está a velocidade do link a partir do seu servidor. Quando é Windows temos diversos sites que fazem este teste, porém e quando é Linux (console)? Podemos faze o teste usando o speedtest-cli através da linha de comando. Abaixo mostramos o passo a passo para instalar em um CentOS […]
Protegendo o Apache com fail2ban no Centos 7
Estamos levando em consideração que você já tem os requisitos como iptables e etc instalado no seu servidor. Instalação: Instalando o repositório (se não tiver instalado)
1 |
yum install epel-release |
Instalando o fail2ban
1 |
yum install fail2ban |
Ativando o serviço
1 |
systemctl enable fail2ban |
Copie o arquivo jail.conf para jail.local
1 2 |
cd /etc/fail2ban cp jail.conf jail.local |
Agora você deve abrir o jail.local e fazer as configurações que achar necessário. […]
Erro Postfix – The sender address is not a valid RFC-5321 address
Caso você tenha alguma site que envie e-mail e o mesmo não chegue ao destinho, sugerimos que você analise o maillog. Caso o erro ao enviar seja The sender address is not a valid RFC-5321 address (fornecido pelo servidor de destino) a solução é simples. Isto acontece bastante com o Gmail (Google). Se o e-mail […]
Migrar as bases MYSQL de um servidor para o outro
Caso queira migrar todas as bases de um servidor para o outro basta fazer um BKP da pasta do MYSQL fazendo um .tar.bz2 e depois levar por FTP para o novo servidor. 1) Descompacte o BKP em uma pasta temporária. 2) Pare o Mysql no novo servidor 3) Copie para a pasta do Mysql do […]
Select para verificar se existem registros duplicados em um campo de uma tabela
Para verificarmos se um campo possui valor duplicado em mais de um registro podemos usar o comando abaixo.
1 2 3 |
SELECT NOME_CAMPO, Count(*) QTD_DUPLICADO FROM NOME_TABELA GROUP BY NOME_CAMPO HAVING Count(*) > 1 |
Redicionando com 301 um domínio antigo para um novo com o .htacess
Para redirecionar todo um site de um domínio antigo com o código http 301 use o código abaixo no inicio do .htaccess. Isto funciona para servidores Apache com o mod_rewrite habilitado. Com este código inclusive todas as páginas serão redirecionadas. Exemplo: http://www.dominiovelho.com.br/blog/ vai ser redirecionado para http://www.dominionovo.com.br/blog/
1 2 3 |
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.novodominio.com.br/$1 [R=301,L] |
Como renovar certificado Let’s Encrypt no Zimbra
O Zimbra funciona com o certificado Let’s Encrypt. Para fazer a instalação basta ir no Wiki do Zimbra que tem o passo a passo. No final deste post fornecemos o link da fonte. O “problema” é que de 3 em 3 meses temos que refazer o processo e resolvemos fazer um resumo para a renovação […]
Como remover o APF (Advance Policy Firewall) Firewall do CentOS
O APF não tem um scripr uninstall, sendo assim temos que remover na mão. Seguem os passos.
1 2 3 4 5 |
chkconfig apf off /etc/init.d/apf stop rm -rf /etc/apf rm -f /etc/cron.daily/fw rm -f /etc/init.d/apf |
Como remover o firewalld e instalar o iptables no CentOS 7
Com a grande oferta de máquinas virtuais a um custo baixo somos obrigados a lidar com algumas limitações. Nosso caso foi com uma máquina muito barata e a “jogada” deles foi limitar a quantidade de pacotes filtrados pelo iptables. Sendo assim não conseguimos usar o firewalls comuns para Linux como AFP e CSF. Temos que […]