• Home
  • Technology
    • Ebullientech
    • Entrepreneurship
    • Video Technology
    • Cloud Computing
    • Business Analysis
  • Healthcare
    • Pharmacology
  • Thoughts
    • Food
    • General
    • Stories
    • Places
    • Workplace
    • Social Issues
    • Reviews
  • Quotes
  • Ebullientech News and Events
  • About

Kamalika's Notebook

thinking nothing...............!!

You are here: Home / Kamalika / Technology / mongoDB / Installing mongoDB in CentOS and Connecting to mongoDB from PHP

Installing mongoDB in CentOS and Connecting to mongoDB from PHP

May 24, 2013 By Kamalika Leave a Comment

There are 2 parts to this article:

1. Installing mongoDB Server

2. Installing PHP mongo extension and make it work!

Part 1: Installing mongoDB Server on CentOS 6.3

Create mongoDB repository configuration:

[bash]

cd /etc/yum/repos.d

vi /etc/yum.repos.d/10gen.repo

[/bash]

Write the following script to create the mongoDB repository configuration:

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

Save the configuration file and install mongoDB:

[bash]yum install mongo-10gen mongo-10gen-server[/bash]

The configuration file is residing on /etc/mongod.conf, and the start/stop/restart script is /etc/rc.d/init.d/mongod. To start the service:

[bash]/etc/init.d/mongod restart[/bash]

Make sure the daemon works properly:

[bash]chkconfig mongod on[/bash]

It is running now. This MongoDB instance will store its data files in the /var/lib/mongo and its log files in /var/log/mongo, and run using the mongod user account.

Next step we are going to install PHP mongo extension.

Pages: 1 2

Filed Under: mongoDB, Technology Tagged With: Installing mongoDB, mongoDB, PHP mongo Extension

« Installing LAMP in Centos 6.3
Reading J. K. Rowling Books »

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

Let’s connect…

  • Facebook
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube

Hello There…

I'm Kamalika, a techpreneur & startup mentor, blogger, hobbyist photographer, Netflix & Kindle indulgent, food connoisseur, Starbucks aficionado and former Disney employee ...next

Looking for something?

Tags

All in One SEO Pack AWS Banaras Blogger Blogging Blogs Dasaswamedh Ghat Ebullientech Ebullientech Interactive LLP Facebook Facebook Developers father's day father's day wishes father's day wishes for dad fathers day love Fathers Day Special Fathers Day wishes from daughter Father’s day memories GeoTech GeoTech Informatics HipHop for PHP Kamalika Guha Roy Kashi Ganga LAMP MySQL Nabaneeta Guha Roy Online Marketing PayPal PayPal's suspension of Indian bank transactions PHP PHP & MySQL Saraswati Puja Search Engine Optimization SEO Startup The Ganges TypePad UCO HUT Varanasi Web 2.0 Web 2.0 Design Web Design Web Marketing WordPress WordPress.COM

Timeline

  • 2021 (3)
  • 2020 (7)
  • 2019 (4)
  • 2018 (1)
  • 2015 (6)
  • 2014 (13)
  • 2013 (9)
  • 2010 (7)
  • 2009 (2)

Topics

Copyright © 2021 · Kamalika Guha Roy, Powered by: Ebullientech