Skip to content

Instantly share code, notes, and snippets.

@vietdien2005
Created April 16, 2018 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vietdien2005/e584b13f45d766bdc5f3360902b55fde to your computer and use it in GitHub Desktop.
Save vietdien2005/e584b13f45d766bdc5f3360902b55fde to your computer and use it in GitHub Desktop.
Build Curl http2

Firstly, install the dev tools you’re doing to need.

yum -y groupinstall "Development Tools" yum -y install libev libev-devel zlib zlib-devel openssl openssl-devel git Next, we’re going to store a few things in /var/tmp and install the new version of openssl into /opt/openssl

mkdir /var/tmp cd /var/tmp wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz tar -zxf openssl-1.0.2-latest.tar.gz cd openssl-1.0.2l mkdir /opt/openssl ./config --prefix=/opt/openssl make make test make install Now on to nghttp2

git clone https://github.com/tatsuhiro-t/nghttp2.git cd nghttp2 autoreconf -i automake autoconf ./configure make make install echo '/usr/local/lib' > /etc/ld.so.conf.d/custom-libs.conf ldconfig ldconfig -p| grep libnghttp2 Then finally, we build curl with http2 and the newer openssl

cd /var/tmp git clone https://github.com/bagder/curl.git cd curl ./buildconf ./configure --with-ssl=/opt/openssl --with-nghttp2=/usr/local --disable-file --without-pic --disable-shared make

Finally, you should be able to run curl with

/var/tmp/curl/src/curl --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment