{"id":1131,"date":"2025-07-30T03:54:01","date_gmt":"2025-07-30T03:54:01","guid":{"rendered":"https:\/\/derecho.unap.edu.pe\/mespinoza\/?p=1131"},"modified":"2025-08-01T04:53:52","modified_gmt":"2025-08-01T04:53:52","slug":"almalinux-9-webmin-apache-multiphp-fpm-8-3-7-4-y-5-6","status":"publish","type":"post","link":"https:\/\/derecho.unap.edu.pe\/mespinoza\/2025\/07\/almalinux-9-webmin-apache-multiphp-fpm-8-3-7-4-y-5-6\/","title":{"rendered":"AlmaLinux 9 + Webmin + Apache + multiphp fpm 8.3, 7.4 y 5.6"},"content":{"rendered":"\n<p>En la terminal de AlmaLinux:<\/p>\n\n\n\n<p>Recomendaci\u00f3n: Instalar Webmin (opcional):<\/p>\n\n\n\n<p>Descargar el instalar rpm (para RedHat y similares) ubicado en la secci\u00f3n Manual de <a href=\"https:\/\/webmin.com\/download\/\">https:\/\/webmin.com\/download\/<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.webmin.com\/download\/rpm\/webmin-current.rpm\">https:\/\/www.webmin.com\/download\/rpm\/webmin-current.rpm<\/a><\/p>\n\n\n\n<p>Ubicarse en el directorio de descarga e instalar<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install .\/webmin-2.402-1.noarch.rpm<\/code><\/pre>\n\n\n\n<p><strong>Actualizar el sistema:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf update -y<br>sudo dnf install epel-release -y<\/code><\/pre>\n\n\n\n<p><strong>Instalar Apache<\/strong><\/p>\n\n\n\n<p>sudo dnf install httpd -y<br>sudo systemctl enable httpd &#8211;now<\/p>\n\n\n\n<p><strong>Instalar MariaDB<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install mariadb mariadb-server -y<br>sudo systemctl enable mariadb --now<br>sudo mysql_secure_installation<\/code><\/pre>\n\n\n\n<p><strong>Agregar repositorio Remi (soporta m\u00faltiples versiones: Php 7.4 y 8.3)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y https:\/\/rpms.remirepo.net\/enterprise\/remi-release-9.rpm<br>sudo dnf module reset php -y<\/code><\/pre>\n\n\n\n<p><strong>Instalar m\u00faltiples versiones de PHP-FPM<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf module enable php:remi-8.3 -y\nsudo dnf install php83 php83-php php83-php-fpm php83-php-mysqlnd -y\nsudo systemctl enable php83-php-fpm --now<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install php74 php74-php php74-php-fpm php74-php-mysqlnd -y\nsudo systemctl enable php74-php-fpm --now<\/code><\/pre>\n\n\n\n<p><strong>Instalaci\u00f3n de PHP 5.6 desde RPM de AlmaLinux 8 (Remi Repo)<\/strong><\/p>\n\n\n\n<p>Crea un directorio de trabajo<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir ~\/php56-rpms &amp;&amp; cd ~\/php56-rpms<\/code><\/pre>\n\n\n\n<p>Descarga los paquetes RPM necesarios<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-5.6.40-45.el8.remi.x86_64.rpm<br>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-cli-5.6.40-45.el8.remi.x86_64.rpm<br>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-common-5.6.40-45.el8.remi.x86_64.rpm<br>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-fpm-5.6.40-45.el8.remi.x86_64.rpm<br>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-mysqlnd-5.6.40-45.el8.remi.x86_64.rpm<br>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-runtime-3.0-1.el8.remi.x86_64.rpm<br>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-syspaths-5.6-1.el8.remi.x86_64.rpm<\/code><\/pre>\n\n\n\n<p>Instalarlos en AlmaLinux 9&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install *.rpm --allowerasing<\/code><\/pre>\n\n\n\n<p>Y si hay conflictos graves con dependencias:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rpm -Uvh --nodeps --force *.rpm<\/code><\/pre>\n\n\n\n<p>Como resultado debe aparecer algo similar a esto:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>advertencia:php56-php-5.6.40-45.el8.remi.x86_64.rpm: EncabezadoV4 RSA\/SHA256 Signature, ID de clave 5f11735a: NOKEY Verifying... ################################# &#91;100%] Preparando... ################################# &#91;100%] Actualizando \/ instalando... 1:php56-runtime-3.0-1.el8.remi ################################# &#91; 14%] 2:php56-php-common-5.6.40-45.el8.re################################# &#91; 29%] 3:php56-php-cli-5.6.40-45.el8.remi ################################# &#91; 43%] 4:php56-php-fpm-5.6.40-45.el8.remi ################################# &#91; 57%] 5:php56-php-5.6.40-45.el8.remi ################################# &#91; 71%] 6:php56-syspaths-5.6-1.el8.remi ################################# &#91; 86%] 7:php56-php-mysqlnd-5.6.40-45.el8.r################################# &#91;100%] ===================================================================== WARNING : PHP 5.6 have reached its \"End of Life\" in January 2019. Even, if this package includes some of the important security fixes, backported from 8.1, the UPGRADE to a maintained version is very strongly RECOMMENDED. =====================================================================<\/code><\/pre>\n\n\n\n<p>Verificar que PHP 5.6 est\u00e9 instalado<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo \/opt\/remi\/php56\/root\/usr\/bin\/php -v<\/code><\/pre>\n\n\n\n<p>Si aparece este error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/remi\/php56\/root\/usr\/bin\/php: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory<\/code><\/pre>\n\n\n\n<p>Instalar manualmente OpenSSL 1.1<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install compat-openssl11<\/code><\/pre>\n\n\n\n<p>Volver a verificar:<\/p>\n\n\n\n<p>\/opt\/remi\/php56\/root\/usr\/bin\/php -v<\/p>\n\n\n\n<p>Si aparece este error:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PHP Warning: PHP Startup: Unable to load dynamic library '\/opt\/remi\/php56\/root\/usr\/lib64\/php\/modules\/pdo_mysql.so' - \/opt\/remi\/php56\/root\/usr\/lib64\/php\/modules\/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0 PHP 5.6.40 (cli) (built: Dec 6 2024 10:27:24) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>wget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-pdo-5.6.40-45.el8.remi.x86_64.rpm<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo rpm -Uvh --force php56-php-pdo-5.6.40-45.el8.remi.x86_64.rpm\nwget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-pdo-5.6.40-45.el8.remi.x86_64.rpm\nsudo rpm -Uvh --force php56-php-pdo-5.6.40-45.el8.remi.x86_64.rpm\n\/opt\/remi\/php56\/root\/usr\/bin\/php -v\n<\/code><\/pre>\n\n\n\n<p>Si aparece este mensaje, PHP 5.6.40 ya est\u00e1 funcionando.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/remi\/php56\/root\/usr\/bin\/php -v \nPHP 5.6.40 (cli) (built: Dec 6 2024 10:27:24) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies<\/code><\/pre>\n\n\n\n<p>Verifica m\u00f3dulos instalados:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/opt\/remi\/php56\/root\/usr\/bin\/php -m<\/code><\/pre>\n\n\n\n<p>Si faltan m\u00f3dulos que necesites (curl, mbstring, gd, etc.), puedes buscar e instalar desde:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/php56-rpms\n\nwget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-mbstring-5.6.40-45.el8.remi.x86_64.rpm\n\nwget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/php56-php-gd-5.6.40-45.el8.remi.x86_64.rpm\n\nsudo rpm -Uvh --force php56-php-mbstring-*.rpm\n\nsudo rpm -Uvh --force php56-php-gd-*.rpm\n\nwget http:\/\/rpms.remirepo.net\/enterprise\/8\/remi\/x86_64\/gd-last-2.3.3-2.el8.remi.x86_64.rpm\n\nsudo rpm -Uvh --force --nodeps gd-last-*.rpm\n\n\/opt\/remi\/php56\/root\/usr\/bin\/php -m | grep -E 'curl|mbstring|gd'<\/code><\/pre>\n\n\n\n<p>Debe resultar:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php56-rpms]$ \/opt\/remi\/php56\/root\/usr\/bin\/php -m | grep -E 'curl|mbstring|gd' \ncurl\nmbstring<\/code><\/pre>\n\n\n\n<p><strong>Asegura que los servicios est\u00e9n habilitados y corriendo<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># PHP 5.6\nsudo systemctl enable php56-php-fpm --now\n\n# PHP 7.4\nsudo systemctl enable php74-php-fpm --now\n\n# PHP 8.3\nsudo systemctl enable php83-php-fpm --now\n<\/code><\/pre>\n\n\n\n<p>Verifica los puertos de escucha de cada FPM<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ss -ltnp | grep php-fpm<\/code><\/pre>\n\n\n\n<p>Habilitar m\u00f3dulos en Apache<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install -y mod_fcgid<\/code><\/pre>\n\n\n\n<p>Verificar:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>httpd -M | grep proxy_fcgi\n\nPosible resultado:\n httpd -M | grep proxy_fcgi\nAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message\n proxy_fcgi_module (shared)<\/code><\/pre>\n\n\n\n<p>Listar servicios y reiniciarlos:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl list-units --type=service | grep php\n\nResultado:\nsystemctl list-units --type=service | grep php\n  php56-php-fpm.service              loaded active running The PHP FastCGI Process Manager\n  php74-php-fpm.service              loaded active running The PHP FastCGI Process Manager\n  php83-php-fpm.service              loaded active running The PHP FastCGI Process Manager\n\nReiniciar:\n\nsudo systemctl restart php56-php-fpm\nsudo systemctl restart php74-php-fpm\nsudo systemctl restart php83-php-fpm\n\nVerificar socket Unix:\n\nsudo nano \/etc\/opt\/remi\/php56\/php-fpm.d\/www.conf\nDebe estar est\u00e1 directiva:\nlisten = \/var\/opt\/remi\/php56\/run\/php-fpm\/www.sock\n\nComando opcional:\nsudo find \/ -name www.conf 2&gt;\/dev\/null | grep php56\n<\/code><\/pre>\n\n\n\n<p>Configurar Apache para permitir .htaccess<\/p>\n\n\n\n<p>En tu VirtualHost (por ejemplo \/etc\/httpd\/conf\/httpd.conf o  \/etc\/httpd\/conf.d\/sitioejemplo.conf), aseg\u00farate de tener AllowOverride All por ejemplo:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Directory \"\/var\/www\/html\"&gt;\n   <strong> AllowOverride All<\/strong>\n    Require all granted\n&lt;\/Directory&gt;\n\nDocumentRoot \/var\/www\/html\nServerName localhost\n&lt;Directory \"\/var\/www\/html\"&gt;\n    <strong>AllowOverride All<\/strong>\n    Require all granted\n&lt;\/Directory&gt;<\/code><\/pre>\n\n\n\n<p>Directorios de prueba para cada versi\u00f3n (opcional)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mkdir -p \/var\/www\/php56 \/var\/www\/php74 \/var\/www\/php83\n\necho \"&lt;?php phpinfo(); ?&gt;\" | sudo tee \/var\/www\/php56\/index.php\necho \"&lt;?php phpinfo(); ?&gt;\" | sudo tee \/var\/www\/php74\/index.php\necho \"&lt;?php phpinfo(); ?&gt;\" | sudo tee \/var\/www\/php83\/index.php\n<\/code><\/pre>\n\n\n\n<p><strong>Crear archivos .htaccess por <b>versi\u00f3n<\/b> de php en los directorios deseados <\/strong><\/p>\n\n\n\n<p>\/var\/www\/php83\/.htaccess \u2192 PHP 8.3<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;FilesMatch \\.php$&gt;\n    SetHandler \"proxy:unix:\/var\/opt\/remi\/php83\/run\/php-fpm\/www.sock|fcgi:\/\/localhost\"\n&lt;\/FilesMatch&gt;<\/code><\/pre>\n\n\n\n<p><br>\/var\/www\/php74\/.htaccess \u2192 PHP 7.4<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;FilesMatch \\.php$&gt;\n    SetHandler \"proxy:unix:\/var\/opt\/remi\/php74\/run\/php-fpm\/www.sock|fcgi:\/\/localhost\"\n&lt;\/FilesMatch&gt;<\/code><\/pre>\n\n\n\n<p><br>\/var\/www\/php56\/.htaccess \u2192 PHP 5.6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;FilesMatch \\.php$&gt;\n    SetHandler \"proxy:unix:\/var\/opt\/remi\/php56\/run\/php-fpm\/www.sock|fcgi:\/\/localhost\"\n&lt;\/FilesMatch&gt;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>Cambiar propietario de los directorios (opcional)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chown -R apache:apache \/var\/www\/php56 \/var\/www\/php74 \/var\/www\/php83<\/code><\/pre>\n\n\n\n<p><strong>Configurar Firewall para habilitar el servicio HTTP (puerto 80)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --add-service=http --permanent<br>sudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p><strong>Configurar Firewall para habilitar el servicio HTTPS (puerto 43)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --add-service=https --permanent<br>sudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Verificar:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --list-all<\/code><\/pre>\n\n\n\n<p>Resultado esperado:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --list-all<br>public (active)<br>target: default<br>icmp-block-inversion: no<br>interfaces: wlp1s0<br>sources:<br>services: cockpit dhcpv6-client http https ssh<br>ports:<br>protocols:<br>forward: yes<br>masquerade: no<br>forward-ports:<br>source-ports:<br>icmp-blocks:<br>rich rules:<\/code><\/pre>\n\n\n\n<p><strong>Opcional: Configurar Firewall para habilitar el puerto 10000 (Webmin)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --permanent --add-port=10000\/tcp<br>sudo firewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Verificar:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo firewall-cmd --list-ports<\/code><\/pre>\n\n\n\n<p>Resultado esperado:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>10000\/tcp<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>En la terminal de AlmaLinux: Recomendaci\u00f3n: Instalar Webmin (opcional): Descargar el instalar rpm (para RedHat y similares) ubicado en la secci\u00f3n Manual de https:\/\/webmin.com\/download\/ https:\/\/www.webmin.com\/download\/rpm\/webmin-current.rpm&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/derecho.unap.edu.pe\/mespinoza\/2025\/07\/almalinux-9-webmin-apache-multiphp-fpm-8-3-7-4-y-5-6\/\">Seguir leyendo<span class=\"screen-reader-text\">AlmaLinux 9 + Webmin + Apache + multiphp fpm 8.3, 7.4 y 5.6<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,10],"tags":[],"class_list":["post-1131","post","type-post","status-publish","format-standard","hentry","category-manuales","category-software-libre","entry"],"_links":{"self":[{"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/posts\/1131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/comments?post=1131"}],"version-history":[{"count":34,"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/posts\/1131\/revisions"}],"predecessor-version":[{"id":1170,"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/posts\/1131\/revisions\/1170"}],"wp:attachment":[{"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/media?parent=1131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/categories?post=1131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/derecho.unap.edu.pe\/mespinoza\/wp-json\/wp\/v2\/tags?post=1131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}