服務器包含: nodejs、git、mongodbnode
安裝meteorgit
$ curl https://install.meteor.com/ | sh
安裝demeteorizergithub
$ npm install -g demeteorizer
安裝pm2mongodb
$ npm install -g pm2
在倉庫根目錄鍵入shell
$ demeteorizer
打包(構建nodejs可用)代碼apache
$ cd .demeteorized/bundle/programs/server
$ npm install
返回倉庫根目錄鍵入npm
$ MONGO_URL=mongodb://localhost:27017/test PORT=80 ROOT_URL=http://localhost:80 pm2 start main.js
參考 https://www.kancloud.cn/summe... 安裝最新版本(包含了npm,無需單獨安裝)bash
安裝 nvm服務器
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
or Wget:curl
$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
使用nvm安裝node
$ nvm install 4.6.1
設置默認node版本
$ nvm alias default v5.0.0
$ meteor --port 80 Error: listen EACCES
$ sudo meteor --port 80
$ mupx setup: sudo:no tty present and no askpass program specified
編輯 /etc/sudoers 增長行
Defaults visiblepw;
參考:http://blog.csdn.net/buptxx/a...
ServerName localhost<VirtualHost *:80>
ServerName www.pay4china2.comProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>ProxyPass /groupchat http://www.pay4china.com:3000/groupchat max=20 ttl=120 retry=300
ProxyPassReverse /groupchat http://www.pay4china:3000/groupchat</VirtualHost>
Q:
AH00526: Syntax error on line 30 of /etc/apache2/sites-enabled/000-default.conf: Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration
A:
$ sudo a2enmod proxy $ sudo /etc/init.d/apache2 restart
Q:
No protocol handler was valid for the URL /groupchat. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
A:
$ sudo a2enmod proxy_http