Giter VIP home page Giter VIP logo

php-7-debian's Introduction

Install PHP 7 on Debian/Ubuntu

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

  • 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

  • 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.

Please note that these are very simple scripts that don't implement error checking or process validation.

Building PHP 7 on Orange Pi Zero (ARM)

Usage

$ git clone https://github.com/kasparsd/php-7-debian.git
$ cd php-7-debian
$ ./build.sh
$ sudo ./install.sh

On systems with little amount of RAM such as Raspberry Pi you might want to decrease the number of parallel make jobs by passing the JOB_COUNT variable:

$ JOB_COUNT=1 ./build.sh

The default job count is equal to the number of CPU cores.

The PHP-FPM can be operated using the php7-fpm init script:

Usage: /etc/init.d/php7-fpm {start|stop|status|restart|reload|force-reload}

while the FPM socket is available at

127.0.0.1:9007

and PHP CLI:

$ /usr/local/php7/bin/php -v
PHP 7.0.13 (cli) (built: Jan  6 2016 01:17:03) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

Configuration files

All PHP configuration files are stored under /usr/local/php7:

/usr/local/php7/lib/php.ini
/usr/local/php7/etc/php-fpm.conf
/usr/local/php7/etc/php-fpm.d/www.conf
/usr/local/php7/etc/conf.d/modules.ini

while the Debian init script is added to:

/etc/init.d/php7-fpm

Extensions

Note that most of the third-party PHP extensions are not yet compatible with PHP 7 and GoPHP7-ext (also on GitHub) is a project to help do that. Here is a list of PHP modules that are enabled by default in this build:

$ /usr/local/php7/bin/php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mcrypt
mhash
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

Installing Extensions

Please note that you need to restart php7-fpm to activate the extension.

Install the Memcached Extension

$ cd php-7-debian/extensions
$ ./memcached-build.sh
$ ./memcached-install.sh

Install the Imagick Extension

$ cd php-7-debian/extensions
$ ./imagick-build.sh
$ ./imagick-install.sh

Credits

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.