As a PHP siege division, if you do not play PHP source installation is not justified. We know that PHP is so popular, with its open source culture and lamp matching has a lot of relationship. Some programs that rely on these features may not work because PHP7 has abandoned many features, so think twice before you try. For example, many domestic software is dependent on the MySQL-related functions, if you develop PHP application, please use MYSQLI instead. However, WordPress is no problem, enjoy the use of it.
Below to get to the point, the first step, of course, download source and decompression
$ cd ~$ wget http://cn2.php.net/distributions/php-7.0.2.tar.gz$ tar-zxvf php-7.0 . 2 . TAR.GZCD php-7.0. 2
The second step is to compile the configuration, if you have previously installed other versions of PHP, please delete, and then install PHP7;
./configure--prefix=/opt/php-7.0.5--with-config-file-path=/opt/php-7.0.5/etc--enable-fpm--with-fpm-user=www-data--with-fpm-group=www-data--with-mysql-sock--with-mysqli-- With-pdo-mysql--with-iconv-dir--with-freetype-dir--with-jpeg-dir--with-png-dir--with-libxml-dir=/USR--disable-rpath--enable-bcmath--enable-shmop--enable-inline-optimization--with-curl--enable-mbregex-- Enable-mbstring--enable-FTP--WITH-GD--enable-gd-native-ttf--enable-sockets--enable-soap--without-pear--with-gettext--disable-fileinfo-- Enable-maintainer-zts--disable-debug--enable-shared--enable-opcache--enable-pdo--with-iconv--with-mcrypt-- With-mhash--with-openssl--enable-xml--with-xmlrpc--with-libxml-dir--enable-pcntl--enable-sysvmsg--enable-sysvsem--enable-sysvshm--with-zlib--enable-Zip--with-readline--without-sqlite3--without-pdo-sqlite--with-libdir=/lib/x86_64-linux-gnu--with-jpeg-dir=/usr/lib--with-apxs2=/usr/bin/apxs--enable-cgi
In fact, this step, will encounter a lot of problems, the system throws some errors out, generally because the system lacks the necessary dependent library. We can help the Niang to solve, not detailed.
Step three, compile and install
Make Make makesudomakeinstall
Under Ubuntu, do PHP7 source installation