PHP7 Installation Notes

Source: Internet
Author: User
Tags mcrypt php website sapi

PHP7 Installation Note Time --Geneva-Geneva  -:Geneva: $Meow, the original. http://Www.hdj.me/php7-install-noteTheme php# Installing Mcryptyum install-Y php-mcrypt libmcrypt libmcrypt-devel# Upgrade BISONCD/var/soft/wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gzTar-xvzf bison-2.6.4. tar.gz CD Bison-2.6.4./Configuremake&&Make install# upgrade re2c, address you'll need re2c0.13.4or laterifYou want to regenerate PHP parsers. Error CD/var/soft/wget http://Sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/downloadTar zxf re2c-0.13.5. tar.gz && CD re2c-0.13.5./Configuremake&&make install compile php7# Create directory mkdir-P/var/soft/PHP7CD/var/soft/php7# Download source code git clone http://Git.php.net/repository/php-src.gitCD php-src./buildconf# configuration parameters./configure--prefix=/usr/local/PHP7--with-config-file-path=/usr/local/php7/etc--with-mcrypt=/usr/include--with-mysql=Mysqlnd--with-mysqli=Mysqlnd--with-pdo-mysql=Mysqlnd--with-GD--with-Iconv--with-zlib--enable-XML--enable-Bcmath--enable-Shmop--enable-Sysvsem--enable-inline-optimization--enable-Mbregex--enable-FPM--enable-mbstring--enable-FTP--enable-gd-native-TTF--with-OpenSSL--enable-Pcntl--enable-Sockets--with-Xmlrpc--enable-Zip--enable-Soap--without-Pear--with-GetText--enable-Session--with-Curl--with-jpeg-dir--with-freetype-dir--enable-opcache################################################################################## when compiling and installing PHP/ENCODINGS.C:101: Undefined reference to ' libiconv_close ' wrong solution # The following error occurred while loading PHP: #/root/downloads/php-5.6.5/EXT/XMLRPC/LIBXMLRPC/ENCODINGS.C: the: Undefined reference to ' Libiconv_open'#/root/downloads/php-5.6.5/EXT/XMLRPC/LIBXMLRPC/ENCODINGS.C:Bayi: Undefined reference to ' Libiconv'#/root/downloads/php-5.6.5/EXT/XMLRPC/LIBXMLRPC/ENCODINGS.C:101: Undefined reference to ' Libiconv_close'#/root/downloads/php-5.6.5/EXT/XMLRPC/LIBXMLRPC/ENCODINGS.C:101: Undefined reference to ' Libiconv_close'# Collect2:error:ld returned1exit status# Make:[sapi/cli/php] Error1# This is a bug (https: Based on the PHP website )//bugs.php.net/bug.php?id=52611). After configure to manually modify the next makefile file, find Extra_libs in the last add-liconv can pass smoothly# (about 104 in the makefile file) # Extra_libs=-LCRYPT-LZ-LRESOLV-LCRYPT-LRT-LMYSQLCLIENT-LMCRYPT-LLTDL-LPNG-LZ-LJPEG-LCURL-LZ-LRT-LM-LDL-LNSL-LXML2- Lz-lm-ldl-lssl-lcrypto-lcurl-lxml2-lz-lm-ldl-lfreetype-lmysqlclient-lz-lm-lssl-lcrypto-ldl-lxml2-lz-lm -ldl-lxml2-lz-lm-ldl-lcrypt-lxml2-lz-lm-ldl-lxml2-lz-lm-ldl-lxml2-lz-lm-ldl-lxml2-lz-lm-ldl-lssl-lc Rypto-lcrypt-liconv################################################################################## compiling and installing make&&sudo make install# configuring the CP php.ini-production/usr/local/php7/etc/PHP.INICP SAPI/fpm/init.d.php-fpm/etc/init.d/php7-Fpmchmod+x/etc/init.d/php7-FPMCP/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.conf# Configuration Opcachevim/usr/local/php7/etc/php.ini# Join Zend_extension=/usr/local/php7/lib/php/extensions/no-debug-non-zts-20141001/opcache.so# Start/etc/init.d/php7-fpm start# View PHP version/usr/local/php7/bin/php-v Result: PHP7.0.0-dev (CLI) (Built:mar3  - Ten: Geneva: -) Copyright (c)1997- -The PHP groupzend Engine v3.0.0-dev, Copyright (c)1998- -Zend Technologies with Zend opcache v7.0.4-dev, Copyright (c)1999- -, by Zend Technologies

PHP7 Installation Notes

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.