# dnf install php74-php-devel php80-php-devel php81-php-devel Of course, the development packages need to be installed: # dnf install composer phpunit8 phpunit9 phpcompatinfo phpcs. Of course, I use the development tools available in the repository which are designed to work with the available PHP version. $ module unload php81 Working on PHP code To switch from one version to another, I simply select the desired version using the environment modules: SetHandler "proxy:unix:/var/opt/remi/php83/run/php-fpm/Each host serves the same pages, but with the selected version. SetHandler "proxy:unix:/var/opt/remi/php82/run/php-fpm/www.sock|fcgi://php82scl" SetHandler "proxy:unix:/var/opt/remi/php81/run/php-fpm/www.sock|fcgi://php81scl" SetHandler "proxy:unix:/var/opt/remi/php80/run/php-fpm/www.sock|fcgi://php80scl" SetHandler "proxy:unix:/var/opt/remi/php74/run/php-fpm/www.sock|fcgi://php74scl" SetHandler "proxy:unix:/var/run/php-fpm/www.sock|fcgi://localhost" I create a configuration file, with alias to the git repositories in which I'm used to work, and the virtual hosts: /etc/httpd/conf.d/nf In the /etc/hosts file, IP aliases declaration:ġ27.0.0.1 php74scl php80scl php81scl php82scl php83scl I create a virtual host for each PHP version. Listen = /var/opt/remi/php74/run/php-fpm/ Each version uses a specific socket file.Įxample, for PHP 7.4, in the /etc/opt/remi/php74/php-fpm.d/www.conf file: I'm not running a production server, but a development workstation, so, to reduce the load, I change the FPM pool configuration to use the "ondemand" mode. I don't use mod_php for a long time, as it only allows a single version, but FPM, which is now used by default on Fedora and EL ≥ 8. # dnf install php83 php83-php-fpm php83-php-mbstring php83-php-mysqlnd. # dnf install php82 php82-php-fpm php82-php-mbstring php82-php-mysqlnd. # dnf install php81 php81-php-fpm php81-php-mbstring php81-php-mysqlnd. # dnf install php80 php80-php-fpm php80-php-mbstring php80-php-mysqlnd. # dnf install php74 php74-php-fpm php74-php-mbstring php74-php-mysqlnd. # dnf install php php-php-fpm php-mbstring php-mysqlnd. I use the Software Collections which allow to install multiple versions, in parallel, without affecting the base system, PHP version 5.6 to 8.3 are available in my repository (7.4 to 8.3 for Fedora ≥ 37 and EL 9), so: Operating system: Fedora 35 Workstation x86_64 (but the examples also work on RHEL, Alma Linux, Rocky Linux, CentOS Stream version 8 or 9)ģrd party repositories: rpmfusion (to listen music while I work) and of course remiįor RHEL, Alma, Rocky or CentOS, instead, read the Configuration Wizard instructions. Old version of this entry, My PHP Workstation for old Fedora and RHEL / CentOS 7 is still available.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |