首页 > 代码库 > centos 7.2编译安装7.1.4

centos 7.2编译安装7.1.4

#下载php
wget http://cn2.php.net/distributions/php-7.1.4.tar.gz


# 解压安装
tar zxvf php-7.1.4.tar.gz

#进入目录
cd php-7.1.4


#安装php7的依赖包
yum install libxml2
yum install openssl openssl-devel
ln -s /usr/lib64/libssl.so /usr/lib/
yum install -y curl-devel
yum install libpng-devel
yum install freetype-devel
yum install libxslt-devel* -y

 

 


./configure --prefix=/server/service/php \
--with-curl \
--with-freetype-dir \
--with-gd \
--with-gettext \
--with-iconv-dir \
--with-kerberos \
--with-libdir=lib64 \
--with-libxml-dir \
--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


#配置文件
cp php.ini-development /server/service/php/lib/php.ini
cp /server/service/php/etc/php-fpm.conf.default /server/service/php/etc/php-fpm.conf
cp /server/service/php/etc/php-fpm.d/www.conf.default /server/service/php/etc/php-fpm.d/www.conf
cp -R /server/download/php7/php-7.1.4/sapi/fpm/php-fpm /etc/init.d/php-fpm

/etc/init.d/php-fpm

centos 7.2编译安装7.1.4