CentOs 6.5 上源码编译安装PHP5.6

首先,安装php扩展依赖包(有些可能是不需要的,可自己甄别)

yum -y install mhash-devel libmcrypt-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel



然后、执行PHP安装前配置

./configure \
--prefix=/usr/local/php \
--with-config-file-path=/usr/local/php/etc \
--with-bz2 \
--with-curl \
--enable-ftp \
--enable-sockets \
--disable-ipv6 \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--enable-gd-native-ttf \
--with-iconv-dir=/usr/local \
--enable-mbstring \
--enable-calendar \
--with-gettext \
--with-libxml-dir=/usr/local \
--with-zlib \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--enable-dom \
--enable-xml \
--with-libdir=lib64 \
--enable-pdo \
--enable-fpm \
--disable-fileinfo



最后、编译并执行安装操作

make && make install


PHP 安装后还需要配置,具体配置将在后续文章中总结!

你可能感兴趣的:(CentOs 6.5 上源码编译安装PHP5.6)