Skip to content

Instantly share code, notes, and snippets.

@sean9999
Forked from james2doyle/install_nodejs.sh
Created December 6, 2017 17:55
Show Gist options
  • Save sean9999/fd8a1eb54cfc9bb81537d8f8e2f65252 to your computer and use it in GitHub Desktop.
Save sean9999/fd8a1eb54cfc9bb81537d8f8e2f65252 to your computer and use it in GitHub Desktop.
Install latest version of Nodejs on Amazon Linux
# become root
sudo -i
# remove old node
yum remove -y nodejs
# remove old node source
rm -f /etc/yum.repos.d/nodesource-el*
# clean up
yum clean all && yum update -y
# install the new RPM
curl --silent --location https://rpm.nodesource.com/setup_7.x | bash -
# clean up
yum clean all && yum update -y
# optional: install build tools for native modules
yum install -y gcc-c++ make
# install nodejs
yum install -y nodejs
# optional: install `forever` for management
npm install forever -g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment