To Gain Knowledge and to become a one, who all wants to become

Dreams are not those which are seen during sleep ,but Dreams are those which do not let you sleep,so see the dreams
and work hard to make them true.

Wednesday, October 27, 2010

Adding Recapcha in Joomla

Download the Recapcha plugin from here :

1. Login to Joomla Administration --> Extensions--> Install/Uninstall

2. Upload the package file and Click on "Upload Fle and Install"

3. Go to Plugin Manager and it will be shown as System - JEZ ReCaptcha, publish it
    and then click on it .

4 .It will open the setting for JEZ ReCapcha plugin ,do the following .
* Enabled : yes
reCAPTCHA Public :
reCAPTCHA Private :
Inclusion Syntax : No
Auto-verify : Yes

Note : The reptcha public and private key has to be generated by signing  into you google accounts /

Rachit Seth

Monday, October 25, 2010

How to recover VM on Xenserver When VM is not bootable from updated kernel (Citrics XenServer )

1 . Create/Restore an new VM (say rescue vm )on the xenserver where the crashed VM is located.

2 . Stop the  rescue  vm and deattach the storage device .

3 . Attach this storage  device on crashed vm .

4 . Change the crashed disk vbd to non bootable after checking with below command

    xe vm-disk-list vm="crashedvm name" l ( It will list the storage devices with their uuid's ,for each disk there is a vdi and vbd uuid )

  xe vbd-param-set uuid=7f6a1563-fc76-31d8-49c2-c03466ca836b bootable=false

5 . Change the rescue vm disk vbd  to bootable .

  xe vbd-param-set uuid=5f64a143633-fc76-313-59a2-d13466ca3egf bootable=true

6  Start the crashed vm ,it will boot with the rescue vm's disk.
    Now ,mount the  original disk  whose vbd you  changed to non bootable earlier .

    mount /dev/xvda /mnt

7 . Going  to /mnt ,we will get the old filesystem.
     cd /mnt/boot/

    Changed the grub.conf default  entry   to 1 i.e the older version of kernel is selected( as i have updated the
    kernel after which vm  does not starts)

8. Stop the this crash vm again .

9 . Deattach  the rescue disk from the crashed vm and change the crashed disk's vbd again to bootable .
       xe vbd-param-set uuid=7f6a1563-fc76-31d8-49c2-c03466ca836b bootable=true.

10 .Now try to start it  and now it is  bootable (from earlier  kernel.)

Saturday, October 23, 2010

S3fs Installation( To mount S3 bucket )

Note :   Your kernel version must support fuse module otherwise you have to update the kernel

yum update kernel-version   (2.6.18-194 and above version supports fuse module)
gcc is also needed to compiling the package.
yum install fuse dkms dkms-fuse
modprobe fuse
cd fuse-2.8.3
make clean
make install
tar -zxvf s3fs-r191-source.tar.gz
cd s3fs
for running make command  you need to install  libcurl which will be available by curl-version.tar.gz
configure the curl-version.tar.gz and then add the line in /etc/ as : /usr/local/lib
export PKG_CONFIG_PATH=/root/fuse-2.8.3:/root/s3fs (the install dir for fuse and s3fs) 

mkdir /tmp/s3fs
cd install-dir
 ./s3fs bucketname -o accessKeyId= -o secretAccessKey=  /tmp/s3fs
ls /tmp/s3fs/1000-thumb.jpg

You can refer to following link for more details-:

Friday, October 15, 2010

Installing MongoDB on Ubuntu

Installing MongoDB on Ubuntu
MongoDB is a schema-free document oriented database developed by 10gen. It has been designed with the high performance demands of modern web applications in mind, and is currently gaining a great deal of traction in the development community. In this article, we will explain how to install the database on the Ubuntu. Fortunately, considerable work has already been done that makes accomplishing this task extremely quick and simple.
The instructions provided here work with Ubuntu's Karmic (9.10) and Lucid (10.04) releases. Both of these are available options with (ve) server. The newest release at the time of this writing (2010-06-10) is the Lucid release. We recommend using this release as it will have the most current application software easily available in the standard repositories.
There are a few steps to get things working.
  • Install the 10gen signing key
  • Set up the 10gen apt repository
  • Install the drivers for your language(s) of choice
The kind folks at 10gen have made the first two steps fairly straightforward. First, shell into your server using SSH as the root user (the commands in this article will all assume you are shelled in as the root user). Next, run the following command from the command line to import the 10gen signing key:
apt-key adv --keyserver --recv 7F0CEB10
This will ensure that the database software you download is actually the software published by 10gen.
Next, we need to set up the 10gen software repository on the system. If you have an Ubuntu Lucid server, run the following command:
echo "deb 10.4 10gen" >> /etc/apt/sources.list.d/10gen.list
If you are using Ubuntu Karmic use the following analagous command:
echo "deb 9.10 10gen" >> /etc/apt/sources.list.d/10gen.list
Now, to actually install the MongoDB database, run the following commands:
apt-get update
apt-get -y install mongodb-stable
This will install the current, stable release of MongoDB, along with the standard associated utility programs like mongodump and mongostat onto your server. If you want to install the unstable (development) or nightly snapshot releases, you may use these commands instead:
apt-get -y install mongodb-unstable
apt-get -y install mongodb-snapshot
If, having done this, you type mongo at the command prompt, and you see something similar to the following:
MongoDB shell version: 1.4.3
url: test
connecting to: test
type "help" for help
then you have successfully installed MongoDB! (Press Ctrl-D to get out of the Mongo shell).
You will probably also want to install language drivers for your language of choice so that you can develop applications using your new Mongo database. Fortunately, a (mt) Media Temple employee has made a repository with pre-packaged drivers that are easy to install. Drivers are currently available for the Perl, PHP, and Python languages.
There are no packages currently for the Ruby programming language due to complications with packaging RubyGems based software. 10gen has instructions for manually installing these drivers.
To install the other drivers, first install the python-software-properties package which helps you interface with the Ubuntu Launchpad platform.
apt-get -y install python-software-properties
Next, add the mongodb-drivers repository.
add-apt-repository ppa:chris-lea/mongodb-drivers
This will take care of installing the signing key and setting up the repository. To install drivers for all three languages, use the following commands.
apt-get update
apt-get -y install libmongodb-perl php5-mongo python-mongodb