Home >Backend Development >PHP Tutorial >PHP7在linux下的安装步骤

PHP7在linux下的安装步骤

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:26:351022browse

安装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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn