这两天升级了下VPS的PHP7,原来是5.3.3。 System: CentOS release 6.7 (Final) 一、备份系统镜像我使用的是阿里云的VPS,可以在控制面板备份镜像。 二、下载与安装# 下载 wget http://cn2.php.net/get/php-5.6.28.tar.gz/from/this/mirror# 解压tar -xjf mirrorcd php-5.6.28#安装编译php时需要的依赖包yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel#如果没有 configure文件,先生成configure文件./buildconf#开始配置(我的安装目录上是/usr/local/php7,可以根据自己情况修改安装目录)./configure --prefix=/usr/local/php7 \--exec-prefix=/usr/local/php7 \--bindir=/usr/local/php7/bin \--sbindir=/usr/local/php7/sbin \--includedir=/usr/local/php7/include \--libdir=/usr/local/php7/lib/php \--mandir=/usr/local/php7/php/man \--with-config-file-path=/usr/local/php7/etc \--with-mysql-sock=/var/lib/mysql/mysql.sock \--with-mcrypt=/usr/include \--with-mhash \--with-mysqli=shared,mysqlnd \--with-pdo-mysql=shared,mysqlnd \--with-gd \--with-iconv \--with-zlib \--with-openssl \--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-cli \--with-jpeg-dir \--with-freetype-dir \--enable-opcache \--enable-fpm \--with-fpm-user=php-fpm \--with-fpm-group=php-fpm \--without-gdbm \--disable-fileinfo#编译make clean |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|