需求
服务器 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