centos编译android7.1,centos 7.2编译安装7.1.4(示例代码)

本文详细介绍了在CentOS系统下编译安装PHP 7.1.4的步骤。包括下载PHP安装包、解压、进入目录,安装PHP 7的依赖包,进行配置,最后完成配置文件的复制和启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#下载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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值