centos 7.2编译安装7.1.4

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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的主要内容,如果未能解决你的问题,请参考以下文章

CentOS 7.2 编译安装dropbear

centos 7.2 安装mongodb 3.4.4免编译

Centos7编译安装nginx1.15+MariaDB10.3+php-7.2

CentOS 7.2源码包编译安装nginx-1.10.2

Redhat 7.2 编译安装PostgreSQL 10

Centos7 编译安装Swoole