手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

[日期:2016-05-20] 来源:Linux公社  作者:Linux [字体: ]

cURL 7.49.0最近发布,cURL是利用URL语法在命令行方式下工作的开源文件传输工具。支持DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP。

cURL支持SSL证书,HTTP POST,HTTP PUTFTP上传基于HTTP的形式上传,代理,cookies,用户+密码验证基本,摘要NTLM协商,Kerberos...),文件传输简历,代理隧道总线负载

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

cURL 7.49.0 更新日志

变化:

  • schannel: Add ALPN support
  • SSH: support CURLINFO_FILETIME
  • SSH: new CURLOPT_QUOTE command “statvfs”
  • wolfssl: Add ALPN support
  • http2: added –http2-prior-knowledge
  • http2: added CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE
  • libcurl: added CURLOPT_CONNECT_TO
  • curl: added –connect-to
  • libcurl: added CURLOPT_TCP_FASTOPEN
  • curl: added –tcp-fastopen
  • curl: remove support for –ftpport, -http-request and –socks

Bug修复:

  • CVE-2016-3739: TLS certificate check bypass with mbedTLS/PolarSSL
  • checksrc.bat: Updated the help to be consistent with generate.bat
  • checksrc.bat: Added support for scanning the tests and examples
  • openssl: fix ERR_remove_thread_state() for boringssl/libressl
  • openssl: boringssl provides the same numbering as openssl
  • multi: fix “Operation timed out after” timer
  • url: don’t use bad offset in tld_check_name to show error
  • sshserver.pl: use quotes for given options
  • Makefile.am: skip the scripts dir
  • curl: warn for –capath use if not supported by libcurl
  • http2: fix connection reuse
  • GSS: make Curl_gss_log_error more verbose
  • build-wolfssl: Allow a broader range of ciphers (Visual Studio)
  • wolfssl: Use ECC supported curves extension
  • openssl: Fix compilation warnings
  • 还有很多

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

wget http://curl.haxx.se/download/curl-7.49.0.tar.gz(见下图)

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

tar -xvf curl-7.49.0.tar.gz(见上图)

cd curl-7.49.0/./configure(见下图)

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

make(见下图)

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

sudo make install(见下图)

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

curl(文件传输工具)常用参数如下:

-c,--cookie-jar:将cookie写入到文件
-b,--cookie:从文件中读取cookie
-C,--continue-at:断点续传
-d,--data:http post方式传送数据
-D,--dump-header:把header信息写入到文件
-F,--from:模拟http表达提交数据
-s,--slient:减少输出信息
-o,--output:将信息输出到文件
-O,--remote-name:按照服务器上的文件名,存在本地
--l,--head:仅返回头部信息
-u,--user[user:pass]:设置http认证用户和密码
-T,--upload-file:上传文件
-e,--referer:指定引用地址
-x,--proxy:指定代理服务器地址和端口
-w,--write-out:输出指定格式内容
--retry:重试次数
--connect-timeout:指定尝试连接的最大时间/s

使用示例
例1:抓取页面到指定文件,如果有乱码可以使用iconv转码
# curl -o linuxidc.html www.linuxidc.com
# curl –s –o linuxidc.html www.linuxidc.com |iconv -f utf-8  #减少输出信息

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

例2:获取HTTP响应头headers
# curl -I http://www.linuxidc.com

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

# curl -D ./header.txt http://www.linuxidc.com  #将headers保存到文件中

Ubuntu 16.04 及衍生版安装 cURL 7.49.0

Ubuntu 用户安装下载器 cURL 7.36.0  http://www.linuxidc.com/Linux/2014-05/102269.htm

Linux curl使用简单介绍 http://www.linuxidc.com/Linux/2008-01/10891.htm

Unix下Curl的使用方法及常用功能记录分享 http://www.linuxidc.com/Linux/2012-08/69154.htm

curl命令使用 http://www.linuxidc.com/Linux/2014-09/107018.htm

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

本文永久更新链接地址http://www.linuxidc.com/Linux/2016-05/131574.htm

linux
相关资讯       curl  Ubuntu安装cURL 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在���站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款