Last active
October 6, 2016 15:18
-
-
Save DorkNstein/990191868719f2b7c3d0e6d5bb985256 to your computer and use it in GitHub Desktop.
Codes to install npm, node and git in new amazon server instance
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
sudo -i | |
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash - | |
yum install -y nodejs | |
yum install -y gcc-c++ make (optional) | |
yum install git | |
node -v --> 4.4.x | |
npm -v --> 2.15.x | |
exit | |
## if npm install doesn't work | |
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 | |
sudo /sbin/mkswap /var/swap.1 | |
sudo /sbin/swapon /var/swap.1 | |
################################################# | |
## npm node modules packages are not running or not getting installed | |
## It might be because of low memory for that amazon ec2 instance (RED-HAT takes 40% memory) | |
## To get around, create a swap file for memory management | |
## Remove all node_modules and reinstall again (npm install) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment