LoginSignup
5

More than 5 years have passed since last update.

AWSにNode.jsをインストール+バーション管理

Posted at

概要

AWSのEC2のLinux(Red Hat Enterprise Linux Server release 7.0)にNode.jsを使えるようにセットアップします。
また、バージョンを管理・変更出来るようにnodebrewでインストールします。

手順

wgetとvimのインストール

$ sudo yum -y install wget
$ sudo yum -y install vim

nodebrewのインストール

https://github.com/hokaccha/nodebrew から取得インストールします。

$ wget git.io/nodebrew
$ perl nodebrew setup

コマンドパスを通す

~/.bashrc
$ vim ~/.bashrc
export PATH=$HOME/.nodebrew/current/bin:$PATH

nodebrewインストール確認

$ nodebrew -v

nodeインストール

今の安定版は0.10.26なのでこのバージョンをインストールします。

$ nodebrew install-binary v0.10.26

nodeを利用出来るように使用バージョンを指定

$ nodebrew use v0.10.26

node利用確認

$ node -v

インストールしたバージョンが表示されればOKです。

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
5