Skip to content

Latest commit

 

History

History
79 lines (64 loc) · 1.48 KB

2016-01-26-upgrade-your-php-7-to-7-0-2.md

File metadata and controls

79 lines (64 loc) · 1.48 KB
id title date author layout guid permalink categories
217
upgrade your PHP 7 to 7.0.2
2016-01-26 16:19:15 +0000
liu1084
post
/?p=217
linux

PHP 7.0.2 has been released.

The changlog is here.

There are 6 steps:

1: download php 7.0.2

cd /usr/local/src
wget http://kr1.php.net/distributions/php-7.0.2.tar.bz2

2: uncompress bz2

tar jxvf php-7.0.2.tar.bz2

3: backup your php.ini

cp /etc/php.ini /tmp/

4: recompile PHP

./configure \
--prefix=/usr/local/php \
--enable-fpm \
--with-litespeed \
--enable-phpdbg \
--enable-debug \
--with-openssl-dir=/usr/local/openssl-0.9.8zh \
--with-zlib-dir=/usr/local/zlib-1.2.8 \
--enable-bcmath \
--enable-calendar \
--with-curl=/usr/local/curl-7.46.0 \
--enable-dba \
--enable-exif \
--with-pcre-dir=/usr/local/pcre-8.37 \
--enable-ftp \
--with-gd \
--enable-intl \
--enable-mbstring \
--with-mcrypt \
--enable-soap \
--enable-sockets \
--enable-wddx \
--enable-zip \
--with-icu-dir=/usr/local/icu4c-56 \
--with-mcrypt=/usr/local/libmcrypt-2.5.8 \
--with-pdo-mysql=/usr/local/mysql \
--with-mysql-sock=/tmp/mysql.sock \
--with-mysqli=/usr/local/mysql/bin/mysql_config  \
--with-config-file-path=/etc/php.ini

5: restart php-fpm

killall php-fpm
ps auxww | grep php
/usr/local/php/sbin/php-fpm

6: restart nginx

/usr/local/nginx/sbin/nginx -s reopen

That’s all.enjoy yourself.