Skip to content

Commit 1a76e30

Browse files
committed
Merge remote-tracking branch 'source/master'
# Conflicts: # build.sh # conf/modules.ini # readme.md
2 parents 4a41332 + b65c10d commit 1a76e30

File tree

7 files changed

+86
-23
lines changed

7 files changed

+86
-23
lines changed

extensions/imagick-build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
cd "$(dirname "$0")"
3+
4+
# Dependencies
5+
sudo apt-get update
6+
sudo apt-get install -y \
7+
imagemagick \
8+
libmagickwand-dev
9+
10+
git clone https://github.com/mkoppanen/imagick.git
11+
cd imagick
12+
git checkout phpseven
13+
git pull
14+
15+
/usr/local/php7/bin/phpize
16+
./configure --with-php-config=/usr/local/php7/bin/php-config
17+
18+
make
19+
sudo make install

extensions/imagick-install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# Add config files
4+
echo "extension=imagick.so" | sudo tee -a /usr/local/php7/etc/conf.d/modules.ini

extensions/memcached-build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
cd "$(dirname "$0")"
3+
4+
# Dependencies
5+
sudo apt-get update
6+
sudo apt-get install -y \
7+
libmemcached-dev \
8+
libmemcached11
9+
10+
git clone https://github.com/php-memcached-dev/php-memcached
11+
cd php-memcached
12+
git checkout php7
13+
git pull
14+
15+
/usr/local/php7/bin/phpize
16+
./configure --with-php-config=/usr/local/php7/bin/php-config
17+
18+
make
19+
sudo make install

extensions/memcached-install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# Enable the module
4+
echo "extension=memcached.so" | sudo tee -a /usr/local/php7/etc/conf.d/modules.ini

extensions/redis-build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
cd "$(dirname "$0")"
3+
4+
# Dependencies
5+
sudo apt-get update
6+
sudo apt-get install -y \
7+
redis-server
8+
9+
git clone https://github.com/phpredis/phpredis.git
10+
cd phpredis
11+
git checkout php7
12+
git pull
13+
14+
/usr/local/php7/bin/phpize
15+
./configure --with-php-config=/usr/local/php7/bin/php-config
16+
17+
make
18+
sudo make install

extensions/redis-install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
# Enable the module
4+
echo "extension=redis.so" | sudo tee -a /usr/local/php7/etc/conf.d/modules.ini

readme.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
These are a set of bash scripts for building and running PHP 7 (CLI and FPM) on Debian based Linux distributions:
44

5-
- `build.sh` installs the necessary build dependencies and the latest development version of PHP with CLI and FPM server APIs (SAPI) from the `PHP-7.x.x` branch of https://github.com/php/php-src
6-
5+
- `build.sh` installs the necessary build dependencies and the latest development version of PHP with CLI and FPM server APIs (SAPI) from the latest PHP 7 branch of https://github.com/php/php-src
6+
77
- `install.sh` sets up PHP-FPM by moving configuration files into their correct locations in `/usr/local/php7` and enables the `php7-fpm` service and adds it to the startup sequence.
88

99
Please note that these are very simple scripts that don't implement error checking or process validation.
@@ -28,17 +28,18 @@ while the FPM socket is available at
2828
127.0.0.1:9007
2929

3030
and PHP CLI:
31-
31+
3232
$ /usr/local/php7/bin/php -v
3333
PHP 7.0.9 (cli) (built: Jun 23 2016 20:58:06) ( NTS )
3434
Copyright (c) 1997-2016 The PHP Group
3535
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
3636
with Zend OPcache v7.0.9, Copyright (c) 1999-2016, by Zend Technologies
3737

38+
3839
## Configuration files
3940

4041
All PHP configuration files are stored under `/usr/local/php7`:
41-
42+
4243
/usr/local/php7/lib/php.ini
4344
/usr/local/php7/etc/php-fpm.conf
4445
/usr/local/php7/etc/php-fpm.d/www.conf
@@ -48,6 +49,7 @@ while the Debian init script is added to:
4849

4950
/etc/init.d/php7-fpm
5051

52+
5153
## Extensions
5254

5355
Note that most of the third-party PHP extensions are [not yet compatible with PHP 7](https://github.com/gophp7/gophp7-ext/wiki/extensions-catalog) and [GoPHP7-ext](http://gophp7.org/) (also on [GitHub](https://github.com/gophp7/gophp7-ext)) is a project to help do that. Here is a list of PHP modules that are enabled by default in this build:
@@ -116,33 +118,26 @@ Note that most of the third-party PHP extensions are [not yet compatible with PH
116118
[PECL]
117119
APCu
118120

119-
## Installing Memcached Extension
120121

121-
[Memcached extension for PHP](https://github.com/php-memcached-dev/php-memcached) already supports PHP 7. First you install the dependencies:
122+
## Installing Extensions
122123

123-
$ sudo apt-get install libmemcached-dev libmemcached11
124-
125-
and then build and install the extension:
124+
Please note that you need to restart `php7-fpm` to activate the extension.
126125

127-
$ git clone https://github.com/php-memcached-dev/php-memcached
128-
$ cd php-memcached
129-
$ git checkout -b php7 origin/php7
126+
### Install the Memcached Extension
130127

131-
$ /usr/local/php7/bin/phpize
132-
$ ./configure --with-php-config=/usr/local/php7/bin/php-config
133-
$ make
134-
$ sudo make install
128+
$ ./php-7-debian/extensions
129+
$ ./memcached-build.sh
130+
$ ./memcached-install.sh
135131

136-
and then append `extension=memcached.so` to `/usr/local/php7/etc/conf.d/modules.ini`:
132+
### Install the Imagick Extension
137133

138-
# Zend OPcache
139-
zend_extension=opcache.so
140-
141-
# Memcached
142-
extension=memcached.so
134+
$ cd php-7-debian/extensions
135+
$ ./imagick-build.sh
136+
$ ./imagick-install.sh
143137

144138

145139
## Credits
146140

147141
- Created by [Kaspars Dambis](http://kaspars.net)
148-
- Based on [`php7.sh`](https://gist.github.com/tvlooy/953a7c0658e70b573ab4) by [Tom Van Looy](http://www.intracto.com/nl/blog/running-symfony2-on-php7)
142+
- Contributors: [Piotr Plenik](https://github.com/jupeter)
143+
- Based on [`php7.sh`](https://gist.github.com/tvlooy/953a7c0658e70b573ab4) by [Tom Van Looy](http://www.intracto.com/nl/blog/running-symfony2-on-php7)

0 commit comments

Comments
 (0)