按照kpush部署文档的说明进行部署过程中,发现文档中没有mongodb安装及初始化相关的操作,导致完全按照文档部署后无法启动服务的错误,现记录下来:
1. 安装mongodb:
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list sudo apt-get update sudo apt-get install mongodb-org
2. 创建kpush数据库,并添加admin用户:
:~$ mongo MongoDB shell version: 2.6.10 connecting to: test > use kpush switched to db kpush > db kpush > db.addUser('admin', 'admin') WARNING: The 'addUser' shell helper is DEPRECATED. Please use 'createUser' instead 2015-05-28T15:04:41.967+0800 Error: couldn't add user: User "admin@kpush" already exists at src/mongo/shell/db.js:1081 > db.auth('admin', 'admin') 1 >做好上面两步操作后,再进行kpush服务器的部署,则就一切ok了。