LoginSignup
2
2

More than 5 years have passed since last update.

Amazon Linux 2 に Node + yarn をインストールする

Last updated at Posted at 2018-10-16

概要

Amazon Linux 2 に Node + yarn をインストールする時のメモ
yum でさっとは入らない、よく忘れるのでメモ

- name: download nvm installer
  become: no
  get_url: url=https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh dest=/tmp/nvm-installer.sh

- name: execute the nvm-installer.sh
  become: yes
  shell: sh /tmp/nvm-installer.sh

- name: Add nvm initialization to profile
  become: yes
  template: src=nvm.sh.j2 dest=/etc/profile.d/nvm.sh

- name: install node
  become: no
  shell: source /etc/profile && nvm install --lts

- name: use node
  become: no
  shell: source /etc/profile && nvm use --lts

- name: download yarn installer
  become: no
  get_url: url=https://yarnpkg.com/install.sh dest=/tmp/yarn-installer.sh

- name: execute the yarn-installer.sh
  become: no
  shell: sh /tmp/yarn-installer.sh
2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2