-
Installation: Simple install of pre compiled PHP7 binary (Compiled in Ubuntu 12.04 64-bits)
-
Compilation from sources: Instructions to compile and install PHP7 from sources.
-
Configuration: To be done in both situations.
-
Installation
$ apt-get install libmcrypt4
$ cd /usr/local/
$ git clone https://github.com/anezi/php7.git php7
$ cp /usr/local/php7/etc/pear.conf.default /etc/pear.conf
- Compilation from sources
$ sudo apt-get install bison libcurl4-openssl-dev
$ cd /tmp
# Download the source
$ wget https://github.com/php/php-src/archive/php-7.0.0RC7.tar.gz
# Extract files.
$ tar -zxvf php-7.0.0RC7.tar.gz
$ cd php-src-php-7.0.0RC7
# Build configuration
./buildconf --force
# Prepare configuration
./configure --enable-fpm --prefix=/usr/local/php7 --enable-opcache --enable-intl --enable-mbstring --enable-zip \
--enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem \
--enable-sysvshm --enable-wddx --enable-gd-native-ttf --enable-gd-jis-conv \
--with-curl --with-mcrypt --with-iconv --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-zlib-dir=/usr \
--with-freetype-dir=/usr --with-openssl --with-pdo-mysql=/usr --with-gettext=/usr --with-zlib=/usr --with-bz2=/usr \
--with-mysqli=/usr/bin/mysql_config
# Compilation
make
# Run tests
make test
# Installation
sudo make install
- Configuration
# For production server:
$ cp /usr/local/php7/lib/php.ini-production /usr/local/php7/lib/php.ini
# For development server:
$ cp /usr/local/php7/lib/php.ini-development /usr/local/php7/lib/php.ini
$ cp /usr/local/php7/etc/init.d/php7-fpm.default /etc/init.d/php7-fpm
$ cp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
# Default pool
$ cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf