Last active
April 10, 2019 08:11
-
-
Save ppshein/60ccbc5a1c42dd77c459c9eee1f6f8df to your computer and use it in GitHub Desktop.
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 | |
yum update | |
yum install -y ruby | |
cd /home/ec2-user | |
aws s3 cp s3://aws-codedeploy-us-west-1/latest/install . | |
chmod +x ./install | |
./install auto | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash | |
nvm install node | |
#https://node.university/blog/10348/aws-ec2-hello-node | |
#!/bin/bash | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install 6.7 | |
sudo sed -i '$i export NVM_DIR="$HOME/.nvm"' /home/ec2-user/.bashrc | |
sudo sed -i '$i [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"' /home/ec2-user/.bashrc | |
#sudo sed -i '$i export PATH=$PATH:/.nvm/versions/node/v6.7.0/bin' /home/ec2-user/.bashrc | |
#!/bin/bash | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
cat <<EOF >> /home/ec2-user/.bashrc | |
export NVM_DIR="/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
EOF | |
nvm install node | |
/// FINAL | |
#!/bin/bash | |
yum update | |
yum install -y ruby | |
cd /home/ec2-user | |
aws s3 cp s3://aws-codedeploy-us-west-1/latest/install . | |
chmod +x ./install | |
./install auto | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
cat <<EOF >> /home/ec2-user/.bashrc | |
export NVM_DIR="/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
EOF | |
nvm install node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment