先执行
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
|
---------------------
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 &