赞
踩
- git clone https://github.com/tatsuhiro-t/nghttp2.git
- cd nghttp2
- autoreconf -i
- automake
- autoconf
- ./configure
- make
- sudo make install
- wget http://curl.haxx.se/download/curl-7.46.0.tar.bz2
- tar -xvjf curl-7.46.0.tar.bz2
- cd curl-7.46.0
- ./configure --with-nghttp2=/usr/local --with-ssl
- sudo make && make install
-
- 编译时注意观察
- HTTP2 support: enabled (nghttp2)
-
- echo '/usr/local/lib' > /etc/ld.so.conf.d/local.conf
- ldconfig
- curl --version
- curl 7.64.1 (x86_64-pc-linux-gnu) libcurl/7.64.1 OpenSSL/1.0.2k zlib/1.2.7 nghttp2/1.38.0-DEV
- Release-Date: 2019-03-27
- Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
- Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL UnixSockets
- curl --http2 -I https://nghttp2.org
-
- HTTP/2 200
- date: Mon, 15 Apr 2019 12:53:49 GMT
- content-type: text/html
- last-modified: Fri, 08 Mar 2019 12:33:02 GMT
- etag: "5c8260fe-19d8"
- accept-ranges: bytes
- content-length: 6616
- x-backend-header-rtt: 0.011655
- strict-transport-security: max-age=31536000
- server: nghttpx
- via: 2 nghttpx
- x-frame-options: SAMEORIGIN
- x-xss-protection: 1; mode=block
- x-content-type-options: nosniff

附注
-I, --head (HTTP/FTP/FILE) Fetch the HTTP-header only!
rpm -ivh http://mirror.city-fan.org/ftp/contrib/yum-repo/city-fan.org-release-2-1.rhel7.noarch.rpm
vim /etc/yum.repos.d/city-fan.repo
- [cityfan]
- name=cityfan
- baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/
- enabled=1
- gpgcheck=0
yum update curl
作者:brookin
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。