您的位置:首页 > 编程语言 > PHP开发

php extensions curl enable AsynchDNS => Yes

2017-08-14 14:34 148 查看
1、下载php源码php-7.0.11
# wget http://cn2.php.net/distributions/php-7.0.11.tar.bz2[/code]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[/code]  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[/code]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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  php extensions curl