zoukankan      html  css  js  c++  java
  • php扩展安装,指定新的openssl

    1 自己从源码编译一个新的openssl

    下载源码下来解压到 /mnt/soft/openssl-1.0.2m (openssl 安装到)

    ./config -h
    /usr/bin/perl ./Configure  -h
    
    ./config shared --prefix=/usr/mylibs --openssldir=/usr/mylibs/ssl 
    -Wl,-rpath=/usr/mylibs/lib
    
    make clean
    make
    make install

    2 编译php_openssl,链接新的openssl

    prefix 是安装目录,openssldir 是配置文件目录,另外建议安装两次,shared 作用是生成动态连接库。

    wget ftp://ftp.openssl.org/source/openssl-1.0.0c.tar.gz
    tar -zxf openssl-1.0.0c.tar.gz
    cd openssl-1.0.0c/

    运行php安装目录下的phpize文件,这时候会在extension目录下生成相应的configure文件。(php71为指定的PHP版本)

    /usr/local/php71/bin/phpize


    必须:指定openssl 目录
    export PKG_CONFIG_PATH=/usr/mylibs/lib/pkgconfig pkg-config --cflags --libs libssl

    ./configure --with-openssl=/usr/mylibs --with-php-config=/usr/local/php71/bin/php-config

    LDFLAGS="-Wl,-rpath-link=/usr/mylibs/lib -Wl,--verbose"

     make && make install

    3 编译mongodb,需要依赖openssl ,链接新的openssl

     
    下载mongodb
    tar -zvxf mongodb-1.5.5.tar.gz
    cd mongodb-1.5.5
    /usr/local/php71/bin/phpize

    指定openssl依赖
    /usr/mylibs
    export PKG_CONFIG_PATH=/usr/mylibs/lib/pkgconfig

    pkg-config --cflags --libs libssl

    ./configure --with-php-config=/usr/local/php71/bin/php-config
    make && make install

  • 相关阅读:
    day19.re正则表达式
    day18.os模块 对系统进行操作
    day17.json模块、时间模块、zipfile模块、tarfile模块
    day16.内置方法与模块
    day15.递归函数
    day14.推导式与生成器
    LeetCode-Permutations II
    LeetCode-Permutations
    LeetCode-Partition List
    LeetCode-Substring with Concatenation of All Words
  • 原文地址:https://www.cnblogs.com/parenth/p/11362946.html
Copyright © 2011-2022 走看看