-
-
Save matwerber1/8341fc838c02a42201489fe796bb52cc to your computer and use it in GitHub Desktop.
ec2-amazon-linux-node-userdata
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
#!/bin/bash | |
# Program: | |
# EC2 initially install node.js, git for development environment. | |
# You can modify nodev and nvmv for changing node and nvm version. | |
# Set permission to ec2-user install above. | |
# History: | |
# 2017/07/25 Hans First release | |
home=/home/ec2-user | |
nodev='8.11.2' | |
nvmv='0.33.11' | |
su - ec2-user -c "curl https://raw.githubusercontent.com/creationix/nvm/v${nvmv}/install.sh | bash" | |
su - ec2-user -c "nvm install ${nodev}" | |
su - ec2-user -c "nvm use ${nodev}" | |
# install git | |
yum install git -y | |
# option initial git for codecommit if want to use please uncomment it | |
# git config --system credential.helper '!aws codecommit credential-helper $@' | |
# git config --system credential.UseHttpPath true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After of hours of trying to figure this out, thank you. Anyone who might be trying to install node v18 using this, theres an ec2 bug that doesn't allow you to install that version. I used v16 instead and it worked.