Ceci est une ancienne révision du document !


add php repositories

add-apt-repository ppa:ondrej/php
add-apt-repository ppa:ondrej/apache2

install all supported versions of php

apt install php-all-dev

install nearly all php modules

apt install `apt list 'php-*' 2>/dev/null | cut -d'/' -f1 | grep -v 'list\|composer\|php-dev\|phpdocumentor\|psr\|zend\|symfony\|doctrine\|horde\|react\|illuminate\|zeta\|apcu\|gmagick\|letodms-lucene\|yac' | sort | uniq`


## equivalent to suphp/suexec, for user laulau & php 7.2
vim /etc/hosts

127.0.0.1 php72.laulau.localhost

vim /etc/apache2/sites-available/php72.laulau.conf

<VirtualHost *:80>
	ServerName php72.laulau.localhost
	ServerAlias laulau.localhost
	DocumentRoot /var/www/html
	<Directory /var/www/html>
	    Options -Indexes +FollowSymLinks +MultiViews
	    AllowOverride All
	    Require all granted
	</Directory>
	<FilesMatch \.php$>
	    SetHandler "proxy:unix:/run/php/php7.2-laulau-fpm.sock|fcgi://localhost/"
	</FilesMatch>
</VirtualHost>

a2ensite php72.laulau.conf
systemctl restart apache2

cd /etc/php/7.2/fpm/pool.d
cp www.conf laulau.conf
vim laulau.conf

[laulau]
user = laulau
group = laulau
listen = /run/php/php7.2-laulau-fpm.sock

systemctl restart php7.2-fpm

  • fpm.1547594675.txt.gz
  • Dernière modification: 2023/05/08 01:41
  • (modification externe)