Posts

Showing posts from 2010

P2P

Designing a P2P grid which will uses decentralized approach entirely. There will be no central coordinator. Is it possible? Let me find it out.

Globus continued....

1. export GLOBUS_LOCATION=/usr/local/globus 2. cd /usr/local/globus/setup/globus 3. ./setup-simple-ca Press y to keep the default subject name. Enter the email of the CA (It must be working because all the certificate requests will be sent to this emailID). Accept the default for expiration date. passphrase: should be hard to guess, as its compromise may compromise all the certificates signed by the CA. Your passphrase must not contain any spaces. Private key is in /home/globus/.globus/simpleCA//private/cakey.pem The public CA certificate is stored in /home/globus/.globus/simpleCA//cacert.pem The distribution package built for this CA is stored in /home/globus/.globus/simpleCA//globus_simple_ca_decb74a7_setup-0.20.tar.gz This file must be distributed to any host wishing to request certificates from this CA. The number decb74a7 in the last line is known as your CA hash. It will be an 8 he...

Creating a grid using Globus toolkit

I have used fedora core 12 for installation. 1. Download the globus toll installer from http://www.globus.org. The current version is gt5.0.2-all-source-installer.tar.bz2. 2. create a directory with root login mkdir /usr/local/globus Copy gt5.0.2-all-source-installer.tar.bz2 to /usr/local/globus using the command cp gt5.0.2-all-source-installer.tar.bz2 /usr/local/globus 2. Login as globus user and extract gt5.0.2-all-source-installer.tar.bz2 in /usr/local/globus: chown globus:globus /usr/local/globus tar xvf gt5.0.2-all-source-installer.tar.bz2 3.Configure the installation path to /usr/local/globus/ using commands: cd gt5.0.2-all-source-installer ./configure --prefix /usr/local/globus/ This will create makefile. 4. make It will take 15-20 minutes depending on the configuration of your machine. 5. make install 6. export GLOBUS_LOCATION on terminal and add a line in ~/.bashrc : export GLOBUS_LOCATION=/usr/local/globus-5.0.2 To setup Simple CA see next blog.

How to set/change ipaddress in linux terminal?

In order to set or change  the IP address assigned to a certain interface in your linux machine you can use GUI. Use System -> Administration ->Network. But it is not always possible to use GUI. Sometimes you need to use terminal commands (like if you are ssh'ing). Login as root and use the following command: #ifconfig eth0 11.11.1.178 netmask 255.255.248.0 where eth0 is the interface you want to configure  11.11.1.178 is the ipaddress being assigned to that interface  255.255.248.0 is the subnet mask we can use system-config-network to configure DNS settings.

SSH login without having to specify password each time

The following procedure works for OpenSSH_5.2p1, OpenSSL 0.9.8k-fips 25 Mar 2009. To check version of your ssh use $ssh -V. In case you have version other than this, please refer $man ssh and check which file permissions should be applied to Files (e.g. permissions of ~/.ssh/authorized_keys should be 640 otherwise ssh will ignore the file). $: ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/swapnil/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/swapnil/.ssh/id_rsa. Your public key has been saved in /home/swapnil/.ssh/id_rsa.pub. The key fingerprint is: 67:50:53:ef:84:67:69:38:87:8a:03:14:fd:8b:df:68 swapnil@localhost.localdomain The key's randomart image is: +--[ RSA 2048]----+ | oo o.. | | . .. . = . | | . .. = O | | . o.. O | | S.+. . | | .+. | | . o | | E...

How to install and configure Sun's Jdk in Fedora 11

Visit http://java.sun.com/javase/downloads/widget/jdk6.jsp to download the jdk. While downloading select "jdk-6u20-linux-i586-rpm.bin". Once downloading is finished login using root privileges and run the following: #chmod 777 jdk-6u20-linux-i586-rpm.bin #./ jdk-6u20-linux-i586-rpm.bin This will start extraction of various packages in the file and the start installing it. Accept the license agreement. If you already have open jdk installed on your machine, then to use the new jdk you need to change the links pointed by /usr/bin/java*. Following lines shows it how to do that: (# prompt means root's shell) #ln -fs /usr/java/jdk1.6.0_20/bin/java /usr/bin/java After changing the link you can check the version using $java -version Similarly we need to change the link for javac, javadoc, javah, javap, javaw #ln -fs /usr/java/jdk1.6.0_20/bin/javac /usr/bin/javac #ln -fs /usr/java/jdk1.6.0_20/bin/javadoc /usr/bin/javadoc #ln -fs /usr/java/jdk1.6.0_20/bin/javah /u...

Threading in linux

Following is the simple program which creates 2 new threads. It uses pthread library.  To compile use "gcc filename.c -pthread" #include #include #include void * run (void * usearg) {     int *count;     struct timespec sleepTime;     struct timespec remainingSleepTime;         count = (int *)usearg;     printf("In child:%d\n",*count);     while(*count <20000)     {         printf("%d\t",*count);         (*count)++;         sleepTime.tv_sec=0;         sleepTime.tv_nsec=100;         nanosleep(&sleepTime,&remainingSleepTime);     }     printf("Child thread finished\n");     return NULL; } void * runAnother (void * usearg) {     int *count;  ...