centos7源码编译安装php7.2

 

1.下载解压安装包

wget php-7.2.15.tar.bz2 http://cn2.php.net/distributions/php-7.2.15.tar.bz2

解压

tar xf php-7.2.15

2安装依赖包

 

yum -y install wget vim pcre pcre-devel openssl openssl-devel httpd-devel libicu-devel gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel ncurses ncurses-devel curl curl-devel krb5-devel libidn libidn-devel openldap openldap-devel nss_ldap cmake boost-devel bison automake libevent libevent-devel gd gd-devel libtool* libxslt libxslt-devel readline readline-devel gmp gmp-devel libcurl libcurl-devel openjpeg-devel

 

3.编译安装

进入php目录

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-pdo --with-iconv-dir  --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir= --enable-xml --enable-session --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-pcntl --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --enable-maintainer-zts --with-xsl --enable-tokenizer
 

make -4     编译

make -4 install    安装

 

 

 

你可能感兴趣的:(centos7源码编译安装php7.2)