- su into root.
- cd to /usr/local/src
- wget latest version, and check md5sum, then extract to current dir.
- cd into php-X.X.X
- Configure with the appropriate configure line below
make -j8
Where 8 is 2x the number of cores available.make install
make clean
For php-fpm, restart with service php-fpm restart
For cli, ensure you run make clean
repeat last 4 steps with the cli configure line
./configure --with-config-file-path=/etc/php/fpm --with-config-file-scan-dir=/etc/php/fpm/conf.d --sysconfdir=/etc/php --prefix=/usr/local --disable-cli --disable-cgi --enable-fpm --with-pdo-mysql=mysqlnd --with-curl --enable-zip --with-tidy --with-openssl --enable-mbstring --enable-soap --with-imagick --with-iconv --with-mysqli=mysqlnd --enable-intl --with-gd --enable-gd-native-ttf --with-mcrypt --with-jpeg-dir=/usr/lib --enable-opcache
./configure --with-config-file-path=/etc/php/cli/php.ini --with-config-file-scan-dir=/etc/php/cli/conf.d --sysconfdir=/etc/php --prefix=/usr/local --disable-cgi --with-pdo-mysql=mysqlnd --with-curl --enable-zip --with-tidy --with-openssl --enable-mbstring --enable-soap --with-imagick --with-iconv --with-mysqli=mysqlnd --enable-intl --with-gd --enable-gd-native-ttf --with-mcrypt --with-jpeg-dir=/usr/lib --with-zlib=/usr