Rumah >pembangunan bahagian belakang >tutorial php >PHP7在linux下的安装步骤
安装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.gztar -xvzf bison-2.6.4.tar.gz cd bison-2.6.4./configuremake && 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/downloadtar zxf re2c-0.13.5.tar.gz && cd re2c-0.13.5./configuremake && make install
编译PHP7:
# 创建目录mkdir -p /var/soft/php7cd /var/soft/php7# 下载源代码git clone http://git.php.net/repository/php-src.gitcd php-src./buildconf# 配置参数./configure
# 编译安装make && sudo make install
查看PHP版本:
/usr/local/php7/bin/php -v