After setting up mongo by hand for 2 servers that are not deployed via puppet, here is a bash script to do it…
sudo su root
cd /opt/ && /usr/bin/curl -OL http://downloads.mongodb.org/linux/mongodb-linux-x86_64-1.4.1.tgz && tar -zxvf mongodb-linux-x86_64-1.4.1.tgz && ln -s /opt/mongodb-linux-x86_64-1.4.1 /opt/mongodb
useradd mongod -u 5005
curl http://gist.github.com/raw/413433/834a3d0ecc96cb36f8918f6d01b65fc082025cc0/gistfile1.sh > /etc/init.d/mongodb
chown mongod:mongod /etc/init.d/mongodb
chmod 750 /etc/init.d/mongodb
mkdir /etc/mongodb
chown mongod:mongod /etc/mongodb
chmod 750 /etc/mongodb
echo "dbpath=/opt/mongodb-data/" > /etc/mongodb/mongodb.conf
chown mongod:mongod /etc/mongodb/mongodb.conf
chmod 750 /etc/mongodb/mongodb.conf
mkdir /opt/mongodb-data
chown mongod:mongod /opt/mongodb-data
chmod 750 /opt/mongodb-data
Hi,
check this out, the most comprehensive guide I could find for installing mongodb (should also apply for 8.04):
http://library.linode.com/databases/mongodb/ubuntu-10.04-lucid
And some Nagios sugar:
http://tag1consulting.com/blog/mongodb-nagios-check
I’ll have a closer look on the init.d start|stop gist you linked.
Cheers,
Rudi
On 10.04 apt-get install should do the trick 😀