Skip to content

Instantly share code, notes, and snippets.

@empurium
Created September 26, 2018 19:16
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 empurium/fc6a95b48e8795e6b5d30749a46aade0 to your computer and use it in GitHub Desktop.
Save empurium/fc6a95b48e8795e6b5d30749a46aade0 to your computer and use it in GitHub Desktop.
Install Node.js LTS on AWS Linux EC2 instance
# Remove the default nodejs 0.10.x / npm 1.x from the system
# the yum autoremove will clean up unused deps afterward
yum erase nodejs
yum autoremove
# Set up the RPM nodesource for the LTS of your choice
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
# Clean up
yum clean all
# Install your node/npm LTS
yum install nodejs
# Confirm
node -v
npm -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment