MongoDB service not starting on RedHat – missing ‘service_uri’

mongodbnosqlredhat

I'm on a Red Hat Enterprise Linux Client release 5.4 (Tikanga) machine

I created my /etc/yum.repos.d/10gen.repo like this:

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1

I installed MongoDB with: sudo yum install mongo-10gen mongo-10gen-server

but when I run: sudo service mongod start

I get: Missing SERVICE_URI environment variable

help! 🙂

Best Answer

That sounds more like a problem with the service command than with MongoDB or the install. Try starting it from init.d instead:

sudo /etc/init.d/mongod start