阿里云上部署 centos+nodejs+mongodb

时间:2014-02-17 19:44:17   收藏:0   阅读:824

先执行

1
yum update

 

nodejs 安装:

1
yum install nodejs

else

1
2
3
4
5
yum repolist
curl -O http://download-i2.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
 
sudo yum install npm --enablerepo=epel

test

1
node -e "console.log(‘Hello World‘);"

  

express 框架 
1
npm install -g express

  

---------------------

安装mongodb

vi /etc/yum.repos.d/mongodb.repo file 

1
2
3
4
5
[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

  

1
yum install mongo-10gen mongo-10gen-server
1
service mongod start | stop | restart

 

 输入 

1
mongo

 基本命令

 

 sftp  root@ip  put get

nohup node app & 

nohup mongod --fork &




原文:http://www.cnblogs.com/piaocz/p/3552538.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!