Skip to content
Sikana Tanupabrungsun edited this page Apr 19, 2018 · 25 revisions

1. Installation

For UBUNTU 14.x

Install git

Install pip

For UBUNTU 16.x

Install pip

  • sudo apt-get install python-pip

Upgrade Celery

  • sudo pip install --upgrade celery

2. Problems with MongoDB

Start MongoDB on boot

** 1. sudo netstat -lpn | grep :27017 ;list the running mongo process

    tcp   0   0 0.0.0.0:27017   0.0.0.0:* LISTEN 11598/mongod    ;Example output

** 2. sudo kill -9 PID ; ex. 11598

** 3. sudo mongod --fork --dbpath /var/lib/mongodb --smallfiles --logpath /var/log/mongodb.log --logappend --config /etc/mongod.conf

Limit Preferences

Unclean Shutdown

  • If the service is terminated, crashed or whatever reasons, the lock file will not be removed and so we have to remove it manually before starting the service
  • sudo rm /var/lib/mongodb/mongod.lock
  • Sometimes you will also need to manually remove a port file
  • sudo rm /tmp/mongodb-27017.sock

3. Problems with MongoDB Authentication

  • Make sure MongoDB uses schema 3
    • db.system.version.save({ "_id" : "authSchema", "currentVersion" : 3 })
  • Then create a new user
    • db.createUser({user: USERNAME, pwd: PWD, roles: [{role: "root", db: "admin"}]})
  • Enable the authentication
    • Edit the config file: sudo pico /etc/mongod.conf
    • Uncomment:
      • security: authorization: enabled
    • Restart the service: sudo service mongod restart