Skip to content

Instantly share code, notes, and snippets.

@james2doyle
Created April 27, 2017 20:56
Show Gist options
  • Save james2doyle/a1f0b415dee4e69b3595b7af1d07e7c1 to your computer and use it in GitHub Desktop.
Save james2doyle/a1f0b415dee4e69b3595b7af1d07e7c1 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