Created
August 1, 2020 11:58
-
-
Save sanjaygeeky/390b66ad383a8015e39793a6d109d3ac to your computer and use it in GitHub Desktop.
Shell script to install nodejs manually
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/bash | |
export NODE_VERSION=4.8.6 | |
apk add --no-cache libstdc++ | |
apk add --no-cache --virtual .build-deps \ | |
binutils-gold \ | |
curl \ | |
g++ \ | |
gcc \ | |
gnupg \ | |
libgcc \ | |
linux-headers \ | |
make \ | |
python | |
curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" | |
tar -xf "node-v$NODE_VERSION.tar.xz" | |
cd "node-v$NODE_VERSION" | |
./configure | |
make -j$(getconf _NPROCESSORS_ONLN) | |
make install | |
apk del .build-deps | |
cd .. \ | |
rm -rf node-v$NODE_VERSION.tar.xz node-v$NODE_VERSION | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment