参考文档:http://jcutrer.com/howto/linux/how-to-compile-php7-on-ubuntu-14
-04
https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/
1.下载php7
2.安装所需的包
apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev
libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev
libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev
libpq-dev libxml2-dev libxstl-dev
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
3.进入到php目录中运行配置
./configure --with-zlib-dir --with-freetype-dir --enable-mbstring --
with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-
mcrypt --with-zlib --with-gd --disable-rpath --enable-inline-optimization
--with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm
--enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash
--enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-
jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl
--with-fpm-user=www-data --with-fpm-group=www-data --with-
libdir=/lib/x86_64-linux-gnu --enable-ftp --with-imap --with-imap-ssl --
with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --
enable-fpm --with-config-file-path=/etc/php --with-config-file-scan-
dir=/etc/php/extensions
4.最后运行 make && make install
5.扩展安装
http://pecl.php.net/下载源码解压
phpize
./configure
make && make install
网友评论