Last active
August 29, 2015 14:00
-
-
Save demofly/11288615 to your computer and use it in GitHub Desktop.
Deployment Debian script for latest nodejs and npm
This file contains hidden or 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 | |
apt-get -y install build-essential checkinstall fakeroot curl | |
src=$(mktemp -d) && cd $src | |
wget -N http://nodejs.org/dist/node-latest.tar.gz | |
tar xzvf node-latest.tar.gz && cd node-v* | |
./configure | |
fakeroot checkinstall -y --install=no --pkgversion $(echo $(pwd) | sed -n -re's/.+node-v(.+)$/\1/p') make -j$(($(nproc)+1)) install | |
dpkg -i node_* | |
wget https://www.npmjs.org/install.sh -O- | bash | |
npm -v && npm install npm -g | |
npm -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment