美文网首页
linux编译安装php8 支持jit

linux编译安装php8 支持jit

作者: Renew全栈工程师 | 来源:发表于2021-07-03 12:04 被阅读0次

1.先下载php8最新源码,并且解压

wget -c https://github.com/php/php-src/archive/refs/tags/php-8.0.8.tar.gz
tar -zxvf php-8.0.8.tar.gz
cd php-src-php-8.0.8/
./buildconf --force

2.安装php需要的依赖库

(ubuntu centos 基本上替换下 前面的apt即可,如果不行找下相对应库的命令安装即可)

sudo apt-get install -y pkg-config build-essential  \
    autoconf bison re2c libxml2-dev libsqlite3-dev libcurl4-gnutls-dev \
    libjpeg-dev libpng-dev libmcrypt-dev  libreadline6-dev libfreetype6-dev \
    libtidy-dev libtool valgrind openssl libssl-dev libzip-dev libwebp-dev \
    libxpm-dev

3.编译

./configure \
 --prefix=/usr/local/php \
 --with-config-file-path=/usr/local/php/etc \
 --enable-fpm \
 --with-fpm-user=www \
 --with-fpm-group=www \
 --enable-rpath \
 --enable-re2c-cgoto \
 --enable-gcc-global-regs \
 --enable-phpdbg \
 --with-valgrind \
 --enable-zts \
 --with-openssl \
 --with-zlib \
 --enable-bcmath \
 --enable-calendar \
 --with-curl \
 --enable-ftp \
 --enable-gd \
 --with-webp \
 --with-jpeg \
 --with-xpm \
 --with-freetype \
 --with-gettext \
 --with-mhash \
 --enable-intl \
 --with-ldap-sasl \
 --enable-mbstring \
 --with-mysqli=mysqlnd \
 --enable-pcntl \
 --with-pdo-mysql=mysqlnd \
 --enable-soap \
 --enable-sockets \
 --enable-sysvmsg \
 --enable-sysvsem \
 --enable-sysvshm \
 --with-tidy \
 --enable-zend-test \
 --with-zip \
 --enable-mysqlnd \
 --with-pear

输出下面内容则成功
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.

如果报错 No package 'oniguruma' found,点击查看处理办法

sudo make
// 加快编译速度可以用下面的
// make -j6
// 使用方法就是在-j后面加一个数字,比如 -j6,意为在编译文件的时候用6个线程进行编译.
sudo make install

相关文章

  • linux编译安装php8 支持jit

    1.先下载php8最新源码,并且解压 2.安装php需要的依赖库 (ubuntu centos 基本上替换下 前面...

  • php8.0源码编译安装之尝鲜篇

    下载 php8源码包 安装 依赖 新建用户 编译和安装 测试 完毕!

  • php8.0介绍

    php8 jit介绍 jit为opcache扩展的一部分,在运行时将某些操作码编译成cpu指令,这些指令就不需要z...

  • Dart 基础

    JIT 与 AOT Dart 是少数同时支持 JIT(Just In Time,即时编译)和 AOT(Ahead ...

  • Flutter之Dart语言特点

    一、JIT与AOT Dart是少数同时支持JIT(即时编译)和AOT(运行期编译)的语言之一,这使Dart具有运行...

  • 面试Android7

    1分屏功能 通知增强 文件权限 emoji表情 网络配置 编译模式jit和aot组合 快速安装 vr支持 虚拟文件...

  • WebRTC arm-linux库编译

    安装交叉编译工具 WebRTC的工程已经支持arm-linux平台库的编译 编译环境ubuntu14.04 然后执...

  • Dart的特性(JIT 与 AOT、内存分配与垃圾回收、单线程模

    一、JIT 与 AOT 借助于先进的工具链和编译器,Dart 是少数同时支持 JIT(Just In Time,即...

  • php8.0.7源码编译安装之生产篇

    下载 php8源码包 新建用户 安装各种依赖 编译和安装 (选择自己需要的安装) 开始配置 新增环境变量 配置...

  • Dart语言概览

    Dart特性 Dart同时支持JIT(Just In Time,即时编译)和AOT(Ahead of Time,运...

网友评论

      本文标题:linux编译安装php8 支持jit

      本文链接:https://www.haomeiwen.com/subject/mdxyultx.html