Home > NoSQL > Install Mongodb & Apache Cassandra

Install Mongodb & Apache Cassandra

Intall mongodb di Fedora 17 (saya menggunakan metode ekstract file):

Siapkan file mongodb terbaru, bisa didownload di sini.

Ekstract file dan pindahkan ke direktori /opt

[bluething@bluething Mentahan]$ tar -xvf mongodb-linux-i686-2.2.0.tar

[root@bluething Mentahan]# mv mongodb-linux-i686-2.2.0 /opt

Buat simbolic link dengan nama mongod ke directory yang tadi sudah kita buat.


[root@bluething opt]# ln -s mongodb-linux-i686-2.2.0 mongodb

Buat direktori /data/db sebagai penyimpan data mongodb. Kemudian atur kepemilikannya


[root@bluething opt]# mkdir -p /data/db

[root@bluething Music]# chown bluething /data/db

Untuk menjalankannya, pindah ke dalam direktori /bin di tempat mongodb terinstal, lalu jalankan


[bluething@bluething bin]$ ./mongod

Untuk mencobanya gunakan perintah ./mongo


[bluething@bluething bin]$ ./mongo
MongoDB shell version: 2.2.0
connecting to: test
> db.test.save( { a: 1 } )
> db.test.find()
{ "_id" : ObjectId("5065d7a817c2306d94a71fed"), "a" : 1 }
{ "_id" : ObjectId("5065ddc46d5c8da0a7510a43"), "a" : 1 }
>

 

Install Apache Cassandra di Fedora 17:

Siapkan file Cassandra terbaru, bisa di download di sini.

Ekstract file dan pindahkan ke direktori /opt.


[bluething@bluething Mentahan]$ tar -xvzf apache-cassandra-1.1.5-bin.tar.gz

[root@bluething Mentahan]# mv apache-cassandra-1.1.5 /opt

Lakukan konfigurasi, edit file conf/cassandra.yaml


# directories where Cassandra should store data on disk.
data_file_directories:
 - /var/lib/cassandra/data

# commit log
commitlog_directory: /var/lib/cassandra/commitlog

# saved caches
saved_caches_directory: /var/lib/cassandra/saved_caches

Kemudian buat direktori /var/lib/cassandra dan atur kepemilikannya.


[root@bluething conf]# mkdir -p /var/lib/cassandra
[root@bluething conf]# chown bluething /var/lib/cassandra

Atur properti untuk log4j, bisa dilihat di conf/log4j-server.properties.


# Edit the next line to point to your logs directory
log4j.appender.R.File=/var/log/cassandra/system.log

Buat direktori /var/log/cassandra dan atur kepemilikannya


[root@bluething conf]# mkdir -p /var/log/cassandra
[root@bluething conf]# chown bluething /var/log/cassandra

Sekarang kita coba menjalankannya


[bluething@bluething apache-cassandra-1.1.5]$ ./bin/cassandra -f

Categories: NoSQL
  1. July 8, 2013 at 8:46 pm

    Hmm is anyone else having problems with the pictures on this blog loading?
    I’m trying to find out if its a problem on my end or if it’s
    the blog. Any suggestions would be greatly appreciated.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: