PHP 静态链接 openssl/nghttp2 及外部扩展

栏目: 服务器 · 发布时间: 6年前

内容简介:注意: 以下过程是为 使用静态连接, 方便部署 规划的编译配置; 使用动态连接的情况很多流程可以简化(无需对 config.m4 进行修改);

注意: 以下过程是为 使用静态连接, 方便部署 规划的编译配置; 使用动态连接的情况很多流程可以简化(无需对 config.m4 进行修改);

  • openssl 1.1.1b

    CC=gcc CXX=g++ ./Configure no-shared --prefix=/data/vendor/openssl-1.1.1 linux-x86_64
  • nghttp2 1.38.0

    PKG_CONFIG_PATH=/data/vendor/openssl-1.1.1/lib/pkgconfig CC=gcc CXX=g++ CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure --prefix=/data/vendor/nghttp2-1.38.0 --enable-shared=no --enable-lib-only # --with-boost=/data/vendor/boost-1.70.0 --enable-asio-lib
  • curl 7.64.1

    CC=gcc CXX=g++ CFLAGS=-fPIC CPPFLAGS=-fPIC ./configure --prefix=/data/vendor/curl-7.64.1 --with-nghttp2=/data/vendor/nghttp2-1.38.0 --with-ssl=/data/vendor/openssl-1.1.1 --with-pic=pic --enable-ipv6 --enable-shared=no --without-libidn2 --disable-ldap --without-libpsl --without-lber --enable-ares
  • php 7.2.18

    CC=gcc CXX=g++ ./configure --prefix=/data/vendor/php-7.2.18 --with-config-file-path=/data/vendor/php-7.2.18/etc --disable-simplexml --disable-xml --disable-xmlreader --disable-xmlwriter --with-readline --enable-mbstring --without-pear --with-zlib --build=x86_64-linux-gnu

    ldd > 扩展

    cd ext/*****
    /data/vendor/php-7.2.17/bin/phpize
    mv config0.m4 config.m4
  • 扩展 openssl.so

    CC=gcc CXX=g++ LDFLAGS="-pthread -ldl" ./configure --with-php-config=/data/vendor/php-7.2.17/bin/php-config --with-openssl=/data/vendor/openssl-1.1.1 --build=x86_64-linux-gnu
  • 扩展 curl.so > 调整 config.m4 以忽略内部检查(检查本身会引起链接问题)

    # 41    CURL_LIBS=`$PKG_CONFIG --libs --static  $PKNAME`
    # 168	#  PHP_CHECK_LIBRARY(curl,curl_easy_perform,
    # 169	#  [
    # 170	    AC_DEFINE(HAVE_CURL,1,[ ])
    # 171	#  ],[
    # 172	#    AC_MSG_ERROR(There is something wrong. Please check config.log for more information.)
    # 173	#  ],[
    # 174	#    $CURL_LIBS
    # 175	#  ])
    # 176
    # 177	#  PHP_CHECK_LIBRARY(curl,curl_easy_strerror,
    # 178	#  [
    # 179	    AC_DEFINE(HAVE_CURL_EASY_STRERROR,1,[ ])
    # 180	#  ],[],[
    # 181	#    $CURL_LIBS
    # 182	#  ])
    # 183
    # 184	#  PHP_CHECK_LIBRARY(curl,curl_multi_strerror,
    # 185	#  [
    # 186	    AC_DEFINE(HAVE_CURL_MULTI_STRERROR,1,[ ])
    # 187	#  ],[],[
    # 188	#    $CURL_LIBS
    # 189	#  ])
    CC=gcc CXX=g++ LDFLAGS="-L/data/vendor/nghttp2-1.38.0/lib -L/data/vendor/openssl-1.1.1/lib" ./configure --with-php-config=/data/vendor/php-7.2.18/bin/php-config --with-curl=/data/vendor/curl-7.64.1 --build=x86_64-linux-gnu

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

组合数学教程

组合数学教程

范林特 / 刘振宏、赵振江 / 机械工业出版社 / 2007-4 / 49.00元

本书介绍组合数学中的基础理论和实际应用,讲述的内容非常广泛,讨论的问题涵盖组合数学所涉及的绝大部分领域。本书不仅包含了通常组合数学教科书中的经典内容,而且收集了若干新的内容,如Lovász筛法、范德瓦尔登积和式猜想、结合区组设计、码和设计等。 本书阐述深入浅出,简明易懂,适合作为高等院校高年级本科生与低年级研究生的组合数学课程教材,也适合作为数学和其他学科的研究人员的参考书。一起来看看 《组合数学教程》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码