php 升级 源码,通过编译安装升级php(保证原有的扩展不变)

本文档详细介绍了如何在CentOS 6.3服务器上,从PHP 5.6.12升级到PHP 7.1.32的步骤,包括下载源码、获取编译参数、编译安装及配置php-fpm,并解决编译错误。
摘要由CSDN通过智能技术生成

需求

服务器 Centos 6.3 上的php版本 5.6.12(如下),现在想升级到 php-7.1.32

php -v

PHP 5.6.12 (cli) (built: Mar 28 2017 23:48:05)

Copyright (c) 1997-2015 The PHP Group

Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

主要步骤

2.wget下载 tar解压

tar -xvf php-7.1.32.tar.gz

3.#获取php编译时的参数

php -i | grep Command

Configure Command => './configure' '--prefix=/alidata/server/php-5.6.12' '--exec-prefix=/alidata/server/php-5.6.12' '--bindir=/alidata/server/php-5.6.12/bin' '--sbindir=/alidata/server/php-5.6.12/sbin' '--includedir=/alidata/server/php-5.6.12/include' '--libdir=/alidata/server/php-5.6.12/lib/php' '--mandir=/alidata/server/php-5.6.12/php/man' '--with-config-file-path=/alidata/server/php-5.6.12/etc' '--with-mcrypt=/usr/include' '--with-mhash' '--with-openssl' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-gd' '--with-iconv' '--with-zlib' '--enable-zip' '--enable-inline-optimization' '--disable-debug' '--disable-rpath' '--enable-shared' '--enable-xml' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--enable-mbregex' '--enable-mbstring' '--enable-ftp' '--enable-gd-native-ttf' '--enable-pcntl' '--enable-sockets' '--with-xmlrpc' '--enable-soap' '--without-pear' '--with-gettext' '--enable-session' '--with-curl' '--with-jpeg-dir' '--with-freetype-dir' '--enable-opcache' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--without-gdbm' '--disable-fileinfo' '--with-iconv=/usr/local/libiconv'

Server API => Command Line Interface

Command buffer size => 4096

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值