Skip to content

Instantly share code, notes, and snippets.

@ClaudioVarandas
Last active March 27, 2017 16:08
Show Gist options
  • Save ClaudioVarandas/a0031788afefdec3c1123816e9fc03cb to your computer and use it in GitHub Desktop.
Save ClaudioVarandas/a0031788afefdec3c1123816e9fc03cb to your computer and use it in GitHub Desktop.
Fedora 25 lamp
####Mysql 5.7
## Fedora 25 ##
MariaDb 10.1
#Fedora 25 provides PHP version 7.0 in its official repository
#Command to install the Remi repository configuration package:
dnf install http://rpms.remirepo.net/fedora/remi-release-25.rpm
#You want multiple versions which means using a Software Collection
#The php56 collection is available in the remi repository
#Command to install:
dnf --enablerepo=remi install php56
#Command to install additional packages:
dnf --enablerepo=remi install php56-php-xxx
#Command to install testing packages:
dnf --enablerepo=remi-test install php56-php-xxx
#Command to check the installed version and available extensions:
php56 --version
php56 --modules
#PHP 5.6 as Software Collection (apache and php-fpm)
#https://blog.remirepo.net/post/2014/08/25/PHP-5.6-as-Software-Collection
#### /opt/remi/php56/root/etc/php-fpm.d/www.conf
# Listen 9002 as 9000 is used by default php-fpm
listen = 127.0.0.1:9002
# Both base and SCL library directories
php_value[include_path] = ".:/opt/remi/php56/root/usr/share/pear:/opt/remi/php56/root/usr/share/php:/usr/share/pear:/usr/share/php"
####/etc/httpd/conf.d/php56scl.conf
<VirtualHost *:80>
ServerName php56scl
# Redirect PHP to php-fpm in SCL
<FilesMatch \.php$>
SetHandler "proxy:fcgi://127.0.0.1:9002"
</FilesMatch>
</VirtualHost>
#switch php version bash/zsh
#https://forum.remirepo.net/viewtopic.php?id=3345
echo $PATH
scl enable php56 bash
echo $PATH
php -v
echo $PATH
scl enable php70 bash
echo $PATH
php -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment