私はこの指示に従いました。
私のLinuxボックスはCentOS 5.5なので、ubuntuがある場合は、このサイトを参照してノードを取得し、socket.ioを配置してください。
NodeJS
- git がインストールされていることを確認するか、単に入手してください。
sudo yum install git
- github サイトからノードの最後のソースを取得します。
git clone http://github.com/ry/node.git && cd ノード
。/構成、設定
作る
インストールする
- これで、「node -v」コマンドを実行して、現在のバージョンをインストールできるようになりました。
ノード パッケージ マネージャー (NPM)
これは、Ruby の世界の gem に似たパッケージ マネージャーです。インストールはとても簡単です:
curl http://npmjs.org/install.sh | し
以上です。
特急
NPM をインストールしたら、次の手順は非常に簡単です。NPM にすべての作業を任せてください。
npm インストール エクスプレス
エクスプレス -v
システムに Express バージョンがインストールされているはずです。
=================================
node.js のインストールに成功しました
node -vと入力すると
それはv0.2.5と言っています
その後、
npmをインストールしようとしました
しかし、それは言います
[root@gcloud node]# curl http://npmjs.org/install.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 85 0 85 0 0 128 0 --:--:-- --:--:-- --:--:-- 395
sh: line 1: syntax error near unexpected token `newline'
sh: line 1: `<html>Moved: <a href="https://npmjs.org/install.sh">https://npmjs.org/install.sh</a>'
私は他のコマンドを試しました、
curl -O https://npmjs.org/install.sh sudo sh install.sh
それは言う
[root@gcloud node]# curl -s https://npmjs.org/install.sh > npm-install-$$.sh
[root@gcloud node]# sh npm-install-*.sh
tar=/bin/tar
version:
tar (GNU tar) 1.23
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
ジョン・ギルモアとジェイ・フェンラソンによって書かれました。古くてサポートされていないバージョンのノード (v0.2.5) を使用しています。ノードを更新して再試行してください。