在centos7下编译安装php7

好多安装php7的博文,所以也就不差这一篇了呀,O(∩_∩)O

准备环境

yum groupinstall "Development tools" -y
yum install libxml2-devel gd-devel libmcrypt-devel libcurl-devel openssl-devel -y

获取php7源码包

wget http://cn2.php.net/distributions/php-7.1.9.tar.gz

编译安装

tar zxvf php-7.1.9.tar.gz 
cd php-7.1.9
./configure --prefix=/usr/local/php7 \
--with-config-file-path=/usr/local/php7/etc \
 --with-curl \
 --with-freetype-dir \
 --with-gd \
 --with-gettext \
 --with-iconv-dir \
 --with-kerberos \
 --with-libdir=lib64 \
 --with-libxml-dir=/usr/ \
 --with-mysqli \
 --with-openssl \
 --with-pcre-regex \
 --with-pdo-mysql \
 --with-pdo-sqlite \
 --with-pear \
 --with-png-dir \
 --with-xmlrpc \
 --with-xsl \
 --with-zlib \
 --enable-fpm \
 --enable-bcmath \
 --enable-libxml \
 --enable-inline-optimization \
 --enable-gd-native-ttf \
 --enable-mbregex \
 --enable-mbstring \
 --enable-opcache \
 --enable-pcntl \
 --enable-shmop \
 --enable-soap \
 --enable-sockets \
 --enable-sysvsem \
 --enable-xml \
 --enable-zip \
 --enable-mysqlnd
 make ZEND_EXTRA_LIBS='-liconv' -j
 make install

猜你喜欢

转载自blog.csdn.net/u012375924/article/details/78133734