一.NodeJs安装
1.下载nodejs源码,这是目前最新版本
https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
查看解压后的README.md获知安装步骤。
Prerequisites (Unix only):
* GCC 4.2 or newer
* G++ 4.2 or newer
* Python 2.6 or 2.7
* GNU Make 3.81 or newer
* libexecinfo (FreeBSD and OpenBSD only)
所以首先确保系统已经安装了python,gcc,g++,如果没有则安装:
$ sudo apt-get install python
$ sudo apt-get install build-essential
$ sudo apt-get install gcc
$ sudo apt-get install g++
2. 解压安装包
tar -zxf node-v0.12.7.tar.gz
cd node-v0.12.7/
3. 编译并安装
./configure –prefix=$HOME/local/nodejs #这里可以不指定目录,直接执行./configure命令也可以。
make #这里有些慢,需要耐心等待
sudo make install
设置环境变量
echo 'export PATH=~/local/nodejs/bin:$PATH' >> ~/.profile
echo 'export NODE_PATH=~/local/nodejs:~/local/nodejs/lib/node_modules' >> ~/.profile
source ~/.profile
4,测试安装
node -v
npm -v
其它的安装
sudo npm install -g bower
sudo npm install -g grunt-cli
sudo npm install -g yo
Deployd安装
npm install -g deployd echo 'export export PATH=~/local/nodejs/lib/node_modules/deployd/bin:$PATH' >> ~/.profile source ~/.profile cd ~/angularjs/pro/deployd另外deployd依赖于mongodb在安装好deployd后还提示mongod必须可用,命令如下:
sudo apt-get install mongodb-server参考http://docs.deployd.com/docs/getting-started/your-first-api.md创建一个hello deployd的示例
dpd create hello-world cd hello-world dpd -d首页:http://localhost:2403/dashboard
参考Pro AngularJS chapter 6创建一个sports store
dpd create sportsstore dpd –p 5500 sportsstore\app.dpd dashboard
http://blog.csdn.net/awj3584/article/details/18401539
http://www.cnblogs.com/xumengxuan/p/3732421.html