Build custom openssl, complying with https://github.com/phpbrew/phpbrew/issues/939#issuecomment-556974953
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 | |
if ! [ $(id -u) = 0 ]; then | |
printf "%s\n" "You need to be root" | |
exit 1 | |
fi | |
# OpenSSL | |
cd /opt | |
wget -O openssl.tar.gz https://www.openssl.org/source/openssl-1.0.2t.tar.gz | |
tar -xzf openssl.tar.gz && \ | |
ln -s /opt/openssl-1.0.2t /opt/openssl-1.0 | |
cd /opt/openssl-1.0 | |
./config shared --prefix=/usr/local/openssl-1.0 --openssldir=/usr/local/openssl-1.0 && \ | |
make -j`nproc` && make install || { >&2 printf "%s" "Fail to compile" && exit 1; } | |
# cURL | |
cd /opt | |
wget -O curl.tar.gz https://curl.haxx.se/download/curl-7.67.0.tar.gz | |
tar -xzf curl.tar.gz && chown -R root:root curl-7.67.0 | |
ln -s /opt/curl-7.67.0 /opt/curl | |
cd /opt/curl | |
./configure --with-ssl=/usr/local/openssl-1.0 --prefix=/usr/local/curl-with-openssl-1.0 && \ | |
make -j`nproc` && make install || { >&2 printf "%s" "Fail to compile" && exit 1; } | |
printf "%s\n" "Done building :)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment