阿里云上部署 centos+nodejs+mongodb
先执行
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‘);" |
1 |
npm install - g express |
---------------------
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 &
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。