diff --git a/build-imagick.sh b/extensions/imagick-build.sh similarity index 100% rename from build-imagick.sh rename to extensions/imagick-build.sh diff --git a/install-imagick.sh b/extensions/imagick-install.sh similarity index 100% rename from install-imagick.sh rename to extensions/imagick-install.sh diff --git a/extensions/memcached-build.sh b/extensions/memcached-build.sh new file mode 100644 index 0000000..66d1032 --- /dev/null +++ b/extensions/memcached-build.sh @@ -0,0 +1,19 @@ +#!/bin/bash +cd "$(dirname "$0")" + +# Dependencies +sudo apt-get update +sudo apt-get install -y \ + libmemcached-dev \ + libmemcached11 + +git clone https://github.com/php-memcached-dev/php-memcached +cd php-memcached +git checkout php7 +git pull + +/usr/local/php7/bin/phpize +./configure --with-php-config=/usr/local/php7/bin/php-config + +make +sudo make install diff --git a/extensions/memcached-install.sh b/extensions/memcached-install.sh new file mode 100755 index 0000000..b9bd7c7 --- /dev/null +++ b/extensions/memcached-install.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# Add config files +echo "zend_extension=memcached.so" >> /usr/local/php7/etc/conf.d/modules.ini + +service php7-fpm restart diff --git a/readme.md b/readme.md index 50b8433..1914464 100644 --- a/readme.md +++ b/readme.md @@ -112,35 +112,18 @@ Note that most of the third-party PHP extensions are [not yet compatible with PH ## Installing Memcached Extension -[Memcached extension for PHP](https://github.com/php-memcached-dev/php-memcached) already supports PHP 7. First you install the dependencies: - - $ sudo apt-get install libmemcached-dev libmemcached11 + $ cd php-7-debian/extensions + $ ./memcached-build.sh + $ sudo ./memcached-install.sh -and then build and install the extension: - - $ git clone https://github.com/php-memcached-dev/php-memcached - $ cd php-memcached - $ git checkout -b php7 origin/php7 - - $ /usr/local/php7/bin/phpize - $ ./configure --with-php-config=/usr/local/php7/bin/php-config - $ make - $ sudo make install - -and then append `extension=memcached.so` to `/usr/local/php7/etc/conf.d/modules.ini`: - - # Zend OPcache - zend_extension=opcache.so - - # Memcached - extension=memcached.so - ## Installing Imagick Extension - $ ./build-imagick.sh - $ sudo ./install-imagick.sh + $ cd php-7-debian/extensions + $ ./imagick-build.sh + $ sudo ./imagick-install.sh ## Credits - Created by [Kaspars Dambis](http://kaspars.net) +- Contributors: [Piotr Plenik](https://github.com/jupeter) - Based on [`php7.sh`](https://gist.github.com/tvlooy/953a7c0658e70b573ab4) by [Tom Van Looy](http://www.intracto.com/nl/blog/running-symfony2-on-php7)