CentOS Compiler Installation PHP56

Source: Internet
Author: User
Pre-Installation Preparation

Yum Groupinstall "Development tools"


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 Curl-devel openss L-devel gdbm-devel db4-devel libxpm-devel libx11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel Xmlrpc-c Xmlrpc-c-devel


Config configuration

./configure--prefix=/usr/local/php--with-apxs2=/usr/local/apache/bin/apxs--enable-fpm--with-curl--with-openssl --enable-mbregex--with-mysql--with-mysqli--with-mysql-sock--enable-pdo--with-pdo-mysql--with-pdo-sqlite-- Enable-mysqlnd--with-gd--enable-gd-native-ttf--enable-exif--with-jpeg-dir=/usr/local/jpeg--with-png-dir=/usr/ Local/png--with-freetype-dir=/usr/local/freetype--enable-gd-jis-conv--with-gettext--with-zlib--enable-zip-- with-bz2--disable-fileinfo--enable-xmlreader--enable-xmlwriter--with-xmlrpc--enable-mbstring-- Enable-inline-optimization


Copying a configuration file

CP Php.ini-development/usr/local/php/lib/php.ini

Date.timezone =asia/shanghai


The problem arises when PHP installation appears sorry, I cannot run APXS. Error resolution method

Open Apache Apxs file

Tell the first line of files #!/replace/with/path/to/perl/interpreter-w

Replace with #!/usr/bin/perl-w

Save to continue compiling


Timezone Asia/shanghai

The above describes the CentOS compilation installation php56, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.