首页 > Web开发 > 详细

php extensions curl enable AsynchDNS => Yes

时间:2017-08-14 21:59:18      阅读:560      评论:0      收藏:0      [点我收藏+]

1、下载php源码php-7.0.11

# wget http://cn2.php.net/distributions/php-7.0.11.tar.bz2

2、安装php-devel

# yum install php-devel  -y

3、编译安装php

# cd php-7.0.11/
# ./configure --prefix=/usr/local/php-7.0.11 --disable-debug --enable-shmop --with-gd --with-jpeg-dir=/usr/lib64 --with-png-dir=/usr/lib64 --with-libxml-dir=/usr/lib64 --with-zlib-dir=/usr/lib64 --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --enable-sockets --with-iconv--enable-mbstring --enable-mbregex --enable-ftp --enable-gd-native-ttf --enable-fpm --enable-pcntl --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-zip --with-freetype-dir 
# make
# make install

4、编译安装curl

  4.1 下载c-ares

# wget https://c-ares.haxx.se/download/c-ares-1.10.0.tar.gz

  4.2 编译安装

# tar xf c-ares-1.10.0.tar.gz
# cd  c-ares-1.10.0
# ./configure --prefix=/usr/local/ c-ares-1.10.0
# make
# make install

 4.3 下载编curl

# wget https://curl.haxx.se/download/curl-7.44.0.tar.bz2

4.4 编译安装curl启用异步支持c-ares

# tar xf curl-7.44.0.tar.bz2
# cd curl-7.44.0
# ./configure --prefix=/usr/local/curl-7.44.0
# make
# make install
# cat  vim /etc/ld.so.conf.d/curl.conf
/usr/local/curl-7.44.0/lib/
#ldconfig

5、制作php的curl扩展

# cd  php-7.0.11/ext/curl
# /usr/local/php-7.0.11/bin/phpize
#  ./configure  --with-php-config=/usr/local/php-7.0.11/bin/php-config  --with-curl=/usr/local/curl-7.44.0/
# make
# make install
# ls  /usr/local/php-7.0.11/lib/php/extensions/no-debug-non-zts-20151012/
curl.so

6、查看AsynchDNS 是否启用

 # /usr/local/php-7.0.11/bin/php -i /etc/php.ini  | grep -A 20 curl
 curl

cURL support => enabled
cURL Information => 7.44.0
Age => 3
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => No
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => No
SSL => Yes
SSPI => No
TLS-SRP => No


相关链接:

http://www.laruence.com/2014/01/21/2939.html 为什么要启用AsynchDNS原因

http://www.haiyun.me/archives/1070.html  PHP重新动态编译Curl扩展添加异步DNS支持c-ares


本文出自 “马行空” 博客,请务必保留此出处http://maxingkong.blog.51cto.com/6184921/1956103

php extensions curl enable AsynchDNS => Yes

原文:http://maxingkong.blog.51cto.com/6184921/1956103

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!