标签:
安装mcrypt:
yum install -y php-mcrypt libmcrypt libmcrypt-devel
升级bison:
cd /var/soft/ wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz tar -xvzf bison-2.6.4.tar.gz cd bison-2.6.4 ./configure make && make install
升级re2c,解决You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.错误:
cd /var/soft/ wget http://sourceforge.net/projects/re2c/files/re2c/0.13.5/re2c-0.13.5.tar.gz/download tar zxf re2c-0.13.5.tar.gz && cd re2c-0.13.5 ./configure make && make install
编译PHP7:
# 创建目录 mkdir -p /var/soft/php7 cd /var/soft/php7 # 下载源代码 git clone http://git.php.net/repository/php-src.git cd php-src ./buildconf # 配置参数 ./configure
# 编译安装
make && sudo make install
查看PHP版本:
/usr/local/php7/bin/php -v
输出结果:
原文地址:http://www.hdj.me/php7-install-note?utm_source=tuicool
标签:
原文地址:http://www.cnblogs.com/zxm0125/p/4809351.html