Created
April 27, 2017 20:56
-
-
Save james2doyle/a1f0b415dee4e69b3595b7af1d07e7c1 to your computer and use it in GitHub Desktop.
Install latest version of Nodejs on Amazon Linux
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
# 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