centos6.5 升级php-7.1.28

  • 安装依赖
yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel
  • 下载php-7.1.28 和 libmcrypt-2.5.7.tar.gz

      提取码:vnjd 链接:https://pan.baidu.com/s/1gaaRLDW2yXNqauhplBpdjw 提取码:vnjd

     安装libmcrypt 和php

# tar -zvxf libmcrypt-2.5.7.tar.gz
# cd libmcrypt-2.5.7
# ./configure
# make & make install

# tar -zvxf php-7.1.28.tar.gz
# cd php-7.1.28
# ./configure --prefix=/usr/local/php --enable-fpm --enable-opcache --with-config-file-path=/usr/local/php/etc --with-apxs2=/usr/local/apache/bin/apxs --enable-sysvsem --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-static --enable-sockets --enable-wddx --enable-zip --enable-calendar --enable-bcmath --enable-soap --with-zlib --with-iconv --with-freetype-dir --with-gd --with-jpeg-dir --with-xmlrpc --enable-mbstring --with-sqlite3 --with-curl --enable-ftp --with-mcrypt --with-openssl  --with-gettext --enable-pcntl
# make 
# make install

   最后

# vim /usr/local/apache/conf

# LoadModule php7_module        modules/libphp7.so   //添加

   测试是否成功

 

# cd /var/www/html/
# vim test.php

 

你可能感兴趣的:(web)