Under Ubuntu, do PHP7 source installation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.