Skip to content

Instantly share code, notes, and snippets.

@matwerber1
Forked from ogckw/ec2-node-amzn.sh
Created September 26, 2018 02:57
Show Gist options
  • Select an option

  • Save matwerber1/8341fc838c02a42201489fe796bb52cc to your computer and use it in GitHub Desktop.

Select an option

Save matwerber1/8341fc838c02a42201489fe796bb52cc to your computer and use it in GitHub Desktop.

Revisions

  1. @ogckw ogckw revised this gist May 28, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ec2-node-amzn.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/bin/bash
    # Program:
    # EC2 initially install node.js, git for development environment.
    # 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:
  2. @ogckw ogckw created this gist May 28, 2018.
    20 changes: 20 additions & 0 deletions ec2-node-amzn.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #!/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