Home > Backend Development > PHP Tutorial > CentOS安装php v8js教程_PHP

CentOS安装php v8js教程_PHP

WBOY
Release: 2016-05-31 13:16:48
Original
1266 people have browsed it

CentOS release 5.11 (Final),CentOS release 6.6 (Final) x64测试通过。

gcc版本,glibc版本,libstdc++.so.6版本,gnu-binutils版本,tar版本,python版本,re2c版本都要对的上才行,最后弄上已经要吐血的,需要glibc高版本的话是搞不了的,硬要搞的话风险太大。

v8js目前最新版0.1.5beta,在CentOS5上是搞不了的,各种版本依赖没法弄,所以都用旧版本。

版本:

代码如下:


gcc-4.4.7,php-5.4,v8-3.15.5,python-2.7


编译libv8.so

代码如下:


wget https://github.com/v8/v8-git-mirror/archive/3.15.5.tar.gz
cd v8-git-mirror-3.15.5/
make dependencies
make ia32.release library=shared -j4


下面应该可以忽略

代码如下:


cp /root/software/v8-git-mirror-3.15.5/out/ia32.release/lib.target/libv8.so /usr/lib/
cp /root/software/v8-git-mirror-3.15.5/include/v8* /usr/include/


直接这么干就行:pecl install v8js-0.1.3

注意:

安装gcc的时候contrib/download_prerequisites可以自动下载需要的依赖。
如果是64位系统,需要yum install glibc-devel.i686 libstdc++.i686等。
make -j4是使用4个逻辑CPU编译,可以加快编译速度,但是可能不稳定发生internal error之类的,去掉-j4即可。亲身体会不要用-j参数,很容易遇到恶心问题。
64位系统如果是yum装的php则php是64位的,需要编译64位的libv8.so(make x64.release library=shared)。

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template