{"id":169,"date":"2023-01-04T17:50:13","date_gmt":"2023-01-04T17:50:13","guid":{"rendered":"https:\/\/lmponceb.com\/?p=169"},"modified":"2023-01-04T17:50:13","modified_gmt":"2023-01-04T17:50:13","slug":"habilitar-php-8-1-de-forma-adicional-en-servidor-amazon-linux","status":"publish","type":"post","link":"https:\/\/lmponceb.com\/index.php\/2023\/01\/04\/habilitar-php-8-1-de-forma-adicional-en-servidor-amazon-linux\/","title":{"rendered":"Habilitar PHP 8.1 de forma adicional en servidor Amazon Linux"},"content":{"rendered":"\n<p><strong>Instalamos EPEL<\/strong><\/p>\n\n\n\n<p>sudo yum -y install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/p>\n\n\n\n<p><strong>Instalamos REMI<\/strong><\/p>\n\n\n\n<p>sudo yum -y install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm<\/p>\n\n\n\n<p><strong>Instalamos yum utils<\/strong><\/p>\n\n\n\n<p>sudo yum -y install yum-utils<\/p>\n\n\n\n<p><strong>Deshabilitamos la versi\u00f3n por defecto de php en remi<\/strong><\/p>\n\n\n\n<p>sudo yum-config-manager &#8211;disable &#8216;remi-php*&#8217;<\/p>\n\n\n\n<p><strong>Activamos la versi\u00f3n 8.1<\/strong><\/p>\n\n\n\n<p>sudo yum-config-manager &#8211;enable remi-php81<\/p>\n\n\n\n<p><strong>Instalamos PHP 8.1 y sus dependencias<\/strong><\/p>\n\n\n\n<p>sudo yum install php81<\/p>\n\n\n\n<p>sudo yum install php81-php-fpm<\/p>\n\n\n\n<p><strong>Habilitamos el servicio de PHP FPM<\/strong><\/p>\n\n\n\n<p>sudo systemctl enable php81-php-fpm<\/p>\n\n\n\n<p>Actualizamos www.conf para que genere un archivo socket desde el cual se conectar\u00e1 Apache<\/p>\n\n\n\n<p>vi \/etc\/opt\/remi\/php81\/php-fpm.d\/www.conf<\/p>\n\n\n\n<p>Agregando linea listen<\/p>\n\n\n\n<p>listen = \/etc\/opt\/remi\/php81\/php-fpm.d\/www.sock<\/p>\n\n\n\n<p><strong>Iniciamos el servicio de PHP FPM<\/strong><\/p>\n\n\n\n<p>sudo systemctl start php81-php-fpm<\/p>\n\n\n\n<p><strong>Actualizamos los permisos del archivo www.sock<\/strong><\/p>\n\n\n\n<p>getfacl \/etc\/opt\/remi\/php81\/php-fpm.d\/www.sock<\/p>\n\n\n\n<p>sudo setfacl -m u:apache:rw \/etc\/opt\/remi\/php81\/php-fpm.d\/www.sock<\/p>\n\n\n\n<p><strong>Creamos carpeta \/var\/www\/php81<\/strong><\/p>\n\n\n\n<p>mkdir \/var\/www\/php81<\/p>\n\n\n\n<p><strong>Creamos virtualhost en apache, para que acceda a una carpeta y ejecute esta versi\u00f3n de PHP<\/strong><\/p>\n\n\n\n<p>Listen 8080<\/p>\n\n\n\n<p>&lt;VirtualHost *:8080&gt;<\/p>\n\n\n\n<p>DocumentRoot \/var\/www\/php81<\/p>\n\n\n\n<p>&lt;Directory \/var\/www\/php81&gt;<\/p>\n\n\n\n<p>Options -Indexes +FollowSymLinks +MultiViews<\/p>\n\n\n\n<p>AllowOverride All<\/p>\n\n\n\n<p>Require all granted<\/p>\n\n\n\n<p>&lt;\/Directory&gt;<\/p>\n\n\n\n<p>&lt;FilesMatch \\.php$&gt;<\/p>\n\n\n\n<p>SetHandler &#8220;proxy:unix:\/etc\/opt\/remi\/php81\/php-fpm.d\/www.sock|fcgi:\/\/localhost&#8221;<\/p>\n\n\n\n<p>&lt;\/FilesMatch&gt;<\/p>\n\n\n\n<p>&lt;\/VirtualHost&gt;<\/p>\n\n\n\n<p><strong>Por ultimo reiniciamos el servidor apache<\/strong><\/p>\n\n\n\n<p>sudo service httpd restart<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Instalamos EPEL sudo yum -y install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm Instalamos REMI sudo yum -y install https:\/\/rpms.remirepo.net\/enterprise\/remi-release-7.rpm Instalamos yum utils sudo yum -y install yum-utils Deshabilitamos la versi\u00f3n por defecto de php en remi sudo yum-config-manager &#8211;disable &#8216;remi-php*&#8217; Activamos la versi\u00f3n 8.1 sudo yum-config-manager &#8211;enable remi-php81 Instalamos PHP 8.1 y sus dependencias sudo yum install php81 sudo yum &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/lmponceb.com\/index.php\/2023\/01\/04\/habilitar-php-8-1-de-forma-adicional-en-servidor-amazon-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Habilitar PHP 8.1 de forma adicional en servidor Amazon Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,17],"tags":[],"class_list":["post-169","post","type-post","status-publish","format-standard","hentry","category-aws","category-linux"],"_links":{"self":[{"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/posts\/169","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/comments?post=169"}],"version-history":[{"count":2,"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/posts\/169\/revisions"}],"predecessor-version":[{"id":171,"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/posts\/169\/revisions\/171"}],"wp:attachment":[{"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/media?parent=169"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/categories?post=169"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lmponceb.com\/index.php\/wp-json\/wp\/v2\/tags?post=169"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}