您的位置:首页 > 运维架构 > Linux

PHP7在linux下的安装步骤

2015-09-15 09:56 513 查看
安装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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: