Friday, March 19, 2010

Installation of CouchDB on RHEL 5

My system configuration

OS : Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel: 2.6.18-128.el5
Hardware: SUN x4200 (AMD Dual-Core AMD Opteron(tm) Processor 2220)

Building Couch from Source Code
  1. Download and install pre-requisites software:

  • libicu-3.6-5.11.1
  • libicu-devel-3.6-5.11.1.x86_64
  • openssl-0.9.8e-7.el5
  • openssl-devel-0.9.8e-7.el5
  • curl-7.15.5-2.el5
  • curl-devel-7.15.5-2.el5
  • automake-1.9.6-2.1
  • autoconf-2.59-12
  • libtool-1.5.22-6.1
  • gcc-4.1.2-44.el5
  • erlang-R12B-5.6.el5.1.x86_64
  • js-devel-1.60-1.el5.rf.x86_64
  • js-1.60-1.el5.rf.x86_64

   2. Download the CouchDB source code
  • apache-couchdb-0.10.1.tar.gz

   3. Untar the couchdb archive

   4. Compile the source code
  • ./configure –with-erlang=/usr/lib64/erlang/usr/include
  • make
  • make install
   5. Modify config file to suit your environment
  • Edit /usr/local/etc/couchdb/local.ini and change the port and bind_address value.
   6. Create couchdb administrator
  •  adduser -r --home /usr/local/var/lib/couchdb -M --shell /bin/bash --comment "CouchDB Administrator" couchdb
   7. Change the ownership of the Apache CouchDB directories:
  • chown -R couchdb:couchdb /usr/local/etc/couchdb
  • chown -R couchdb:couchdb /usr/local/var/lib/couchdb
  • chown -R couchdb:couchdb /usr/local/var/log/couchdb
  • chown -R couchdb:couchdb /usr/local/var/run/couchdb
   8. Change the permission of the Apache CouchDB directories:
  • chmod -R 0770 /usr/local/etc/couchdb
  • chmod -R 0770 /usr/local/var/lib/couchdb
  • chmod -R 0770 /usr/local/var/log/couchdb
  • chmod -R 0770 /usr/local/var/run/couchdb
   9. Setup couchdb to startup automatically after reboot
  • ln -s /usr/local/etc/rc.d/couchdb /etc/init.d/couchdb
  • chkconfig --add couchdb
  • chkconfig --level 345 couchdb on
 10. Start couchdb
  • /sbin/service couchdb start
 11. Launch browser and go to the http://bind_address:port_number. Use the values as per step 5.

Tuesday, March 16, 2010

NoSQL database

Interesting..I am trained in Oracle and have experience in MySQL and PostgreSQL. But when I saw NoSQL database, I am puzzled. 

You can find more information here:
Cassandra
=========
Official website: http://cassandra.apache.org/
Used at: Digg, Facebook, Twitter, Reddit, Rackspace


MongoDB
=======
Official website: http://www.mongodb.org
Used at: ? (do let me know if you have info)

CouchDB
========
Official website: http://couchdb.apache.org/
Online Book for CouchDB (I guess this book is still beta):CouchDB: The Definitive Guide
Used at: ? (do let me know if you have info)

Project Voldemort
=================
Official website: http://project-voldemort.com/
Used at: LinkedIn

I guess there are more NoSQL database available. Then again...I am going to focus on these four. Hopefully by next week, I can run some test on these databases on my Xenserver VM.
Meantime..I have to do some reading.. and re-program my brain from SQL to NoSQL... ...Eventual Consistency.---.Eventually it will be consistent..

Sunday, March 14, 2010

Netbackup 6.5.5 on Linux (RedHat Enterprise Linux)

Just upgraded my master and media servers to Symantec (I still like the name Veritas) Netbackup 6.5.5Successfully update all my RHEL servers with no impact to operation.

Let me share with you what maybe the best way to upgrade:

From Netbackup 5.x to 6.5.5
------------------------------------
  1. Temporary stop any backup job for the client.
  2. Check the client OS version in Netbackup console. 
    • RHEL 3 -- Linux 2.4
    • RHEL 4, RHEL 5 -- Linux 2.6
  3. Use the Netbackup Media or ISO (download from Symantec FileConnect).
  4. Install the base package (Netbackup 6.5). 
  5. Then download Netbackup 6.5.5.Get the packages here
  6. Untar all packages into a single folder. Then run "NB_update.install". It will pickup all the packages that you have untar just now. Install base update first before agent.
From Netbackup 6.x to 6.5.5
-------------------------------------
  1. Temporary stop any backup job for the client.
  2. Check the client OS version in Netbackup console. You must select the right kernel and OS version else you will encounter installation failure.
  3. Run this from your master server.
    1. /usr/openv/netbackup/bin/install_client_files sftp hostname username
  4. Just follow the procedure you see after you run the install_client_files.
  5. Note: The procedure does not update database agent. You need to download the update database agent packages from Symantec website. Then manually update the agent.
    Some advice
    • Turn on all the log on Netbackup client. Create these directories in /usr/openv/netbackup/logs
      • bpcd (communication process for daemon)
      • bpbkar (log debug info)
      • bphdb (database agent log)
      • bpbrm (handle backup and restore request)
      • bptm (tape) or bpdm (disk storage unit)
    • Check the date for shared library (libobk.so) file in /usr/openv/netbackup/bin. It should be within year 2009.
    • Do a /usr/openv/netbackup/bin/bpclntcmd -pn master_server
    • Check if you have configure firewall access for Netbackup port