From 50e4aa622f3922eaaca25d06ed6959df5cbe836c Mon Sep 17 00:00:00 2001 From: Piotr Plenik Date: Tue, 31 May 2016 16:02:54 +0200 Subject: [PATCH 1/3] Reorganize structure for extensions --- .../imagick-build.sh | 0 .../imagick-install.sh | 0 extensions/memcached-build.sh | 19 ++++++++++++ extensions/memcached-install.sh | 6 ++++ readme.md | 30 ++++--------------- 5 files changed, 31 insertions(+), 24 deletions(-) rename build-imagick.sh => extensions/imagick-build.sh (100%) rename install-imagick.sh => extensions/imagick-install.sh (100%) create mode 100644 extensions/memcached-build.sh create mode 100755 extensions/memcached-install.sh 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..53ca2c1 100644 --- a/readme.md +++ b/readme.md @@ -112,33 +112,15 @@ 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 From 99e23ff68f661649b8ab22c9ca98f674f535292e Mon Sep 17 00:00:00 2001 From: Piotr Plenik Date: Tue, 31 May 2016 16:38:02 +0200 Subject: [PATCH 2/3] Add credits --- readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.md b/readme.md index 53ca2c1..121a5ce 100644 --- a/readme.md +++ b/readme.md @@ -125,4 +125,5 @@ Note that most of the third-party PHP extensions are [not yet compatible with PH ## Credits - Created by [Kaspars Dambis](http://kaspars.net) +- Created by [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) From 775ba0783999c33bd6d1000de3a2b27b40bbb9fc Mon Sep 17 00:00:00 2001 From: Piotr Plenik Date: Tue, 31 May 2016 16:39:58 +0200 Subject: [PATCH 3/3] Correct credits --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 121a5ce..1914464 100644 --- a/readme.md +++ b/readme.md @@ -125,5 +125,5 @@ Note that most of the third-party PHP extensions are [not yet compatible with PH ## Credits - Created by [Kaspars Dambis](http://kaspars.net) -- Created by [Piotr Plenik](https://github.com/jupeter) +- 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)