LoginSignup
30
37

More than 5 years have passed since last update.

CentOS 7.2にNode.jsをインストールする

Last updated at Posted at 2017-03-07

Ember.jsを試してみようと思い、Node.jsをインストールした。
OSはCentOS 7.2。sudoでインストールする。

$ cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

パッケージのインストール

Node.jsをインストールするのに必要なパッケージをインストールする。

sudo yum install -y gcc-c++ make

yumリポジトリの追加

NodeJS 6.xのYum Repositoryを追加する。

curl -sL https://rpm.nodesource.com/setup_6.x | sudo bash -

Node.jsのインストール

Node.jsをインストールする。

sudo yum install -y nodejs

インストールしたことを確認するために、バージョンを表示する。

$ node -v
v6.10.0
$ npm -v
3.10.10

参考

30
37
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
30
37