1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ubuntu16.04にnodeをインストール

Posted at

#ubuntuのバージョンとか環境とか
ubuntu16.04
linodeで契約したサーバー

#流れ
nodejsとnpmをインストール
npmからn packageを導入する
nパッケージかkらnodejsとnpmをアプデート

sudo apt-get install -y nodejs npm

sudo npm cache clean
sudo npm install n -g

sudo n stable
sudo ln -sf /usr/local/bin/node /usr/bin/node

#確認
最後にインストールできたか確認
バージョンの確認ができればOK

node -v

実際にプログラムを書いて確認

echo "console.log('Hello World')" >~/test.js
node test.js

ちなみにtest.jsの中身は

test.js
console.log('Hello world')
1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?