Easy installation of mongodb on ubuntu and fedora
Ubuntu
1. Add Repo Key as
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
2. Add Repo Source
for Debian Lenny or older ubuntu add below line to /etc/apt/sources.list
deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
for recent ubuntu add below line to /etc/apt/sources.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
3. Install mongo-db
sudo apt-get install mongodb-10gen
Fedora
1. logged in as root user by su -
2. Add below part to /etc/yum.repos.d/10gen-mongodb.repo
3. yum install mongo-10gen mongo-10gen-server
4. Configure MongoDB Database Server as below
1. nano -w /etc/mongod.conf
2. Set or check the basic setting before start mongodb
make sure that this below things are available in mongodb.conf
logpath=/var/log/mongo/mongod.log
port=2701
dbpath=/var/lib/mongo
5. /etc/init.d/mongod start
After successfull installation of mongodb, we can start it as below on terminal
1. mongo
2. use database_name # default
Ubuntu
1. Add Repo Key as
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
2. Add Repo Source
for Debian Lenny or older ubuntu add below line to /etc/apt/sources.list
deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
for recent ubuntu add below line to /etc/apt/sources.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
3. Install mongo-db
sudo apt-get install mongodb-10gen
Fedora
1. logged in as root user by su -
2. Add below part to /etc/yum.repos.d/10gen-mongodb.repo
10gen] name=10gen Repository baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686 gpgcheck=0
3. yum install mongo-10gen mongo-10gen-server
4. Configure MongoDB Database Server as below
1. nano -w /etc/mongod.conf
2. Set or check the basic setting before start mongodb
make sure that this below things are available in mongodb.conf
logpath=/var/log/mongo/mongod.log
port=2701
dbpath=/var/lib/mongo
5. /etc/init.d/mongod start
After successfull installation of mongodb, we can start it as below on terminal
1. mongo
2. use database_name # default
No comments:
Post a Comment