Skip to content

Instantly share code, notes, and snippets.

@alertor
Created February 27, 2013 10:38
Show Gist options
  • Save alertor/5047003 to your computer and use it in GitHub Desktop.
Save alertor/5047003 to your computer and use it in GitHub Desktop.
install mongodb - CentOS 6.3
# /etc/yum.repos.d/10gen.repo
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
# ---
yum install mongo-10gen mongo-10gen-server
# /etc/mongod.conf
logpath=/var/log/mongo/mongod.log
logappend = true
fork = true
bind_ip = 127.0.0.1
port = 27017
dbpath=/var/lib/mongo
pidfilepath=/var/run/mongodb/mongod.pid
journal = true
nounixsocket = true
auth = true
nohttpinterface = true
# add admin user
$ mongo
use admin
db.addUser("<username>", "<password>")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment