Centos7 compiling php56

Source: Internet
Author: User
Tags curl openssl gettext gmp install openssl mcrypt pear xsl

Compiling and installing php5.6 CENTOS7 environment

Steps:

Download Php5.6wget http://cn2.php.net/distributions/php-5.6.26.tar.bz2//install dependent yum install-y gcc gcc-c++ autoconf libjpeg  Libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc  Glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses Curl openssl-devel gdbm-devel db4-devel libxpm-devel libX11-devel Gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c xmlrpc-c-devel httpd-devel//decompression TAR-JXVF php-5.6.26 . TAR.BZ2CD php-5.6.26//Compile./configure--prefix=/usr/local/php--with-apxs2=/usr/bin/apxs--with-mysql=/usr/local/ MySQL--with-mysql-sock--with-mysqli=/usr/local/mysql/bin/mysql_config--enable-fpm--with-ncurses--enable-soap-- With-libxml-dir--with-xmlrpc--with-openssl--with-mcrypt--with-mhash--with-pcre-regex--with-sqlite3--with-zlib- -enable-bcmath--with-iconv--with-bz2--enable-calendar--with-curl--with-cdb--enable-dom--enable-exif-- Enable-fileinfo--enable-filter--with-pcre-dir--enable-ftp--witH-GD--with-openssl-dir--with-jpeg-dir--with-png-dir--with-zlib-dir--with-freetype-dir--enable-gd-native-ttf-- Enable-gd-jis-conv--with-gettext--with-gmp--with-mhash--enable-json--enable-mbstring--disable-mbregex-- Disable-mbregex-backtrack--WITH-LIBMBFL--with-onig--enable-pdo--with-pdo-mysql--with-zlib-dir--with-pdo-sqlite --with-readline--enable-session--enable-shmop--enable-simplexml--enable-sockets--enable-sqlite-utf8-- Enable-sysvmsg--enable-sysvsem--enable-sysvshm--enable-wddx--with-libxml-dir--with-xsl--enable-zip-- Enable-mysqlnd-compression-support--with-pear

  

Tip: Configure:error:xml2-config not found. Please check your LIBXML2 installation.

Yum Install Libxml2-dev

Tip: Cannot find OpenSSL ' s <evp.h>

Yum Install OpenSSL Openssl-devel

Tip: Configure:error:Please Reinstall the BZIP2 distribution

Yum Install Bzip2-devel

Tip: Configure:error:Please Reinstall the Libcurl distribution-easy.h should be in <curl-dir>/include/curl/

Yum Install Libcurl-devel

Tip: If Configure fails try--with-vpx-dir=<dir> configure:error:jpeglib.h not found

Yum Install Libjpeg-devel

Tip: Configure:error:png.h not found.

Yum Install Libpng-devel

Tip: Configure:error:freetype-config not found

Yum Install Freetype-devel

Tip: configure:error:Unable to locate Gmp.h

Yum Install Gmp-devel

Tip: Configure:error:mcrypt.h not found. Please reinstall Libmcrypt, There is no package with MCrypt for copyright reasons. Additional Installation

wget http://www.atomicorp.com/installers/atomicchmod 777 Atomic./atomicyum  install  php-mcrypt  Libmcrypt  

Tip:configure:error:Cannot Find MySQL header files Under/usr/local/mysql.
Note that the MySQL client library isn't bundled anymore!

Yum Install mysql-devel then modify to Mysqlnd--with-mysql=mysqlnd  --with-mysqli=mysqlnd
The MySQL Native driver (mysql Native Driver abbreviation: MYSQLND) was introduced in the PHP5.3.0 version. Version Mysqlnd after PHP5.4 is used as the default configuration option


Modified installation dependencies:
Yum install-y gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel LIBXML2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses Curl Openssl-devel gdb M-devel db4-devel libxpm-devel libx11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c Xmlrpc-c-devel httpd-devel libxml2-dev  OpenSSL openssl-devel bzip2-devel libcurl-devel libjpeg-devel libpng-devel Freetype-devel Gmp-devel

Mycrypt

wget http://www.atomicorp.com/installers/atomicchmod 777 Atomic./atomicyum  install  php-mcrypt  Libmcrypt  

Compile options:

./configure--prefix=/usr/local/php--with-apxs2=/usr/bin/apxs--with-mysql=mysqlnd--with-mysql-sock--with-mysqli =mysqlnd--enable-fpm--with-ncurses--enable-soap--with-libxml-dir--with-xmlrpc--with-openssl--with-mcrypt-- With-mhash--with-pcre-regex--with-sqlite3--with-zlib--enable-bcmath--with-iconv--with-bz2--enable-calendar-- With-curl--with-cdb--enable-dom--enable-exif--enable-fileinfo--enable-filter--with-pcre-dir--enable-ftp-- WITH-GD--with-openssl-dir--with-jpeg-dir--with-png-dir--with-zlib-dir--with-freetype-dir--enable-gd-native-ttf --enable-gd-jis-conv--with-gettext--with-gmp--with-mhash--enable-json--enable-mbstring--disable-mbregex-- Disable-mbregex-backtrack--WITH-LIBMBFL--with-onig--enable-pdo--with-pdo-mysql--with-zlib-dir--with-pdo-sqlite --with-readline--enable-session--enable-shmop--enable-simplexml--enable-sockets--enable-sqlite-utf8-- Enable-sysvmsg--enable-sysvsem--enable-sysvshm--enable-wddx--with-xsl--enable-zip --enable-mysqlnd-compression-support--with-pear 

  

Centos7 compiling php56

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.