Created
February 23, 2018 16:13
-
-
Save shin1x1/6718b8c708c9b921b32e33084d52a75c to your computer and use it in GitHub Desktop.
Build curl with openssl in CentOS/RHEL/Amazon Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eux | |
VERSION=7.58.0 | |
OUTPUT=/opt/build | |
rm -rf ${OUTPUT} | |
mkdir ${OUTPUT} | |
yum install -y openssl-devel gcc bzip2 make | |
curl -O https://curl.haxx.se/download/curl-${VERSION}.tar.bz2 | |
tar xvf curl-${VERSION}.tar.bz2 | |
cd curl-${VERSION} | |
./configure --prefix=${OUTPUT} \ | |
--with-ssl \ | |
--enable-libcurl-option \ | |
--enable-static=no \ | |
--disable-manual | |
make | |
make install-strip | |
cd ../ | |
rm -rf curl-${VERSION}* | |
rm -rf ${OUTPUT}/bin/curl-config | |
rm -rf ${OUTPUT}/include | |
rm ${OUTPUT}/lib/libcurl.la | |
rm -rf ${OUTPUT}/lib/pkgconfig | |
rm -rf ${OUTPUT}/share |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CentOS 7.x
$ docker run -v `pwd`:/opt -w /opt centos:7 /bin/sh build_curl.sh $ find build build build/bin build/bin/curl build/lib build/lib/libcurl.so.4 build/lib/libcurl.so.4.5.0 build/lib/libcurl.so
Amazon Linux 2017.09
$ docker run -v `pwd`:/opt -w /opt amazonlinux:2017.09 /bin/sh build_curl.sh