Skip to content

Instantly share code, notes, and snippets.

@L1so
Last active September 6, 2022 04:57
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 L1so/07d12bceb8e147adab9e5dfc0f3f15aa to your computer and use it in GitHub Desktop.
Save L1so/07d12bceb8e147adab9e5dfc0f3f15aa to your computer and use it in GitHub Desktop.
#!/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