Php 7 compilation and installation and php5 coexistence-php Tutorial

Source: Internet
Author: User
PHP 7 compilation and installation coexist with php5 1. Download
wget  http://php.net/get/php-7.0.5.tar.gz/from/a/mirror

2. extract


tar zxvf php-7.0.5.tar.gzcd php-7.0.5

3. install php7 in/usr/local/php.


./configure --prefix=/usr/local/php7 \ --with-curl \ --with-freetype-dir \ --with-gd \ --with-gettext \ --with-iconv-dir \ --with-kerberos \ --with-libdir=lib64 \ --with-libxml-dir \ --with-mysqli \ --with-openssl \ --with-pcre-regex \ --with-pdo-mysql \ --with-pdo-sqlite \ --with-pear \ --with-png-dir \ --with-xmlrpc \ --with-xsl \ --with-zlib \ --enable-fpm \ --enable-bcmath \ --enable-libxml \ --enable-inline-optimization \ --enable-gd-native-ttf \ --enable-mbregex \ --enable-mbstring \ --enable-opcache \ --enable-pcntl \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvsem \ --enable-xml \ --enable-zip

4. configuration

cp php.ini-production /usr/local/php7/etc/php.inicp /usr/local/php7/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.confcp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.confcp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm7



In php7 www. conf configuration file configuration phpfpm port, modify usr/local/php7/etc/php-fpm.d/www. conf

5. Error

Xsl errors
Symptom: configure: error: xslt-config not found. Please reinstall the libxslt> = 1.1.0 distribution
Work und: yum install-y libxslt-devel libxml2 libxml2-devel

Make error: make: *** [sapi/cli/php] error 1

Solution: make ZEND_EXTRA_LIBS = '-liconv'

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.