Skip to content

Instantly share code, notes, and snippets.

@hykw
Last active August 5, 2016 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hykw/c7c5ab21413e096c3a2204bed3210463 to your computer and use it in GitHub Desktop.
Save hykw/c7c5ab21413e096c3a2204bed3210463 to your computer and use it in GitHub Desktop.
CentOS6にnodejsをインストール

前に試行錯誤した時に入らなくてとても苦労したけど、CentOS 6.xにLTS(4.3.0)のnode.jsをインストールする の手順いっぱつでなぜか入った。。。

sudo yum remove nodejs
rm -rf /usr/lib/node_modules
sudo rpm -Uvh https://rpm.nodesource.com//pub_4.x/el/6/x86_64/nodesource-release-el6-1.noarch.rpm
sudo yum install nodejs

古かったので nvm でつっこんだ。

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.1/install.sh | bash
source ~/.bash_profile

nvm ls-remote
nvm install v5.12.0
npm install -g brunch

最後、.bash_profile に nvm use 5.12.0 を追加しないと npm が使えない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment