Browsing all articles tagged with mongodb

Saat install mongo extension untuk php di vps bersistem operasi Centos, muncul error sebagai berikut.

[~]# pecl install mongo
downloading mongo-1.1.4.tgz ...
Starting to download mongo-1.1.4.tgz (68,924 bytes)
.................done: 68,924 bytes
18 source files, building
running: phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
building in /var/tmp/pear-build-root/mongo-1.1.4
running: /root/tmp/pear/mongo/configure
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
ERROR: `/root/tmp/pear/mongo/configure' failed

Duh kenapa nih, pas install di laptop bersistem operasi Ubuntu 10.04 kagak pernah ada masalah, di Centos kok bermasalah gini ya. Setelah gogling sana gogling sini, akhirnya diputuskan untuk install manual, caranya sebagai berikut.

[~]# wget http://pecl.php.net/get/mongo-1.1.4.tgz
[~]# tar -zxf mongo-1.1.4.tgz
[~]# cd mongo-1.1.4
[~]# phpize
[~]# ./configure
[~]# make
[~]# make install

Kemudian tambahkan extension=mongo.so ke file php.ini, restart apache dan ekstensi mongo sudah terinstall dan siap digunakan :D

Problem:

Thu Mar 31 07:55:27 Error: couldn’t connect to server 127.0.0.1 (anon):1154
exception: connect failed

Solution:

$ sudo rm -rf /var/lib/mongodb/mongod.lock #depend on mongodb config
$ sudo mongod -repair
$ sudo service mongodb start

And the problem is solved

$ mongo
MongoDB shell version: 1.6.5
connecting to: test
>

=-=-=-=-=
Powered by Blogilo

MongoDB merupakan salah satu dari beberapa noSQL database. Menurut situs nosql-databases.org definisi nosql adalah sebagai berikut.

NoSQL DEFINITION: Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open-source and horizontal scalable. The original intention has been modern web-scale databases. The movement began early 2009 and is growing rapidly. Often more characteristics apply as: schema-free, easy replication support, simple API, eventually consistent / BASE (not ACID), and more. So the misleading term "nosql" (the community now translates it mostly with "not only sql") should be seen as an alias to something like the definition above.

Terus terang saya sendiri masih bingung tentang noSQL database ini, karena saya juga baru ngerti kalo ada yang namanya noSQL. Setelah googling kesana kemari, akhirnya ada sedikit pencerahan walaupun tetep masih bingung :D . Untuk mengobati rasa penasaran akhirnya saya coba menginstall salah satu noSQL database yaitu MongoDB pada laptop saya yang berOS Ubuntu. Cara Menginstallnya adalah sebagai berikut. Read more »