Friday, October 22, 2010

React .Vs. Respond


Suddenly, a cockroach flew from somewhere and sat on a lady. I
wondered if this was the cockroach’s response to all the glory that
was spoken about it! She started screaming out of fear. With panic
stricken face and trembling voice, she started jumping, with both her
hands desperately trying to get rid of the cockroach. Her reaction was
contagious, as everyone in her group got cranky to what was happening.
The lady finally managed to push the cockroach to another lady in the
group. Now, it was the turn of the other lady in the group to continue
the drama. The waiter rushed forward to their rescue. In the relay of
throwing, the cockroach next fell upon the waiter. The waiter stood
firm, composed himself and observed the behaviour of the cockroach on
his shirt. When he was confident enough, he grabbed and threw it out
with his fingers.

Sipping my coffee and watching the amusement, the antenna of my mind
picked up a few thoughts and started wondering, was the cockroach
responsible for their histrionic behaviour? If so, then why was the
waiter not disturbed? He handled it near to perfection, without any
chaos. It is not the cockroach, but the inability of the ladies to
handle the disturbance caused by the cockroach that disturbed the
ladies.

I realized even in my case then , it is not the shouting of my father
or my boss that disturbs me, but it’s my inability to handle the
disturbances caused by their shouting that disturbs me. It’s not the
traffic jams on the road that disturbs me, but my inability to handle
the disturbance caused by the traffic jam that disturbs me. More than
the problem, it’s my reaction to the problem that hurts me.

The Take-Away
The women reacted, whereas the waiter responded. We should not react
in life, we should always respond.

Reactions are always instinctive whereas responses are always intellectual.

Postgis 1.4.* with postgresql 8.4 Ubuntu 9.10 /9.04

apt-get update
apt-get install vim
#The sources are still not available on the regular package servers... edit the sources
vim /etc/apt/sources.list

deb http://ppa.launchpad.net/pitti/postgresql/ubuntu jaunty main
deb-src http://ppa.launchpad.net/pitti/postgresql/ubuntu jaunty main

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8683D8A2
sudo apt-get update
sudo apt-get install postgresql-8.4
#This changes the port from 5433 to 5432
sudo sed -i.bak -e 's/port = 5433/port = 5432/' /etc/postgresql/8.4/main/postgresql.conf

sudo /etc/init.d/postgresql-8.4 stop
sudo /etc/init.d/postgresql-8.4 start
apt-get install postgresql-server-dev-8.4 libpq-dev
apt-get install libgeos-dev
wget http://postgis.refractions.net/download/postgis-1.4.0.tar.gz
apt-get install proj
tar xvfz postgis-1.4.0.tar.gz
cd postgis-1.4.0
./configure
make
make install
sudo su postgres
#change the postgres password to "atlas" so that you can later login
psql -c"ALTER user postgres WITH PASSWORD 'atlas'"

createdb geodb (with password atlas)
createlang -dgeodb plpgsql
psql -dgeodb -f /usr/share/postgresql/8.4/contrib/postgis.sql
psql -dgeodb -f /usr/share/postgresql/8.4/contrib/spatial_ref_sys.sql
psql -dgeodb -c"select postgis_lib_version();"
#This should return 1.4.0
exit

Thursday, October 21, 2010

Configure Oracle from PHP on Centos 5

1) install apache, php …

yum install httpd php php-mysql php-pear php-devel zlib zlib-devel
yum groupinstall « Development Tools »

2) Download and install oracle instant client (basic and devel) from there:

http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/linuxsoft.html

rpm -Uvh oracle-instantclient-basic-.i386.rpm
rpm -Uvh oracle-instantclient-devel-
.i386.rpm

3) Add the Oracle instant client to dynamic linker

echo /usr/include/oracle//client/lib/ > /etc/ld.so.conf.d/oracle_client.conf
ldconfig -v

4) Untar the PECL package and prepare it for compiling. You may download it from http://pecl.php.net/package/oci8

tar -xzvf oci-.tgz
cd oci-

phpize

5) Configure the PECL package as a shared object using the instant client and specifying where the Oracle client libraries are. Then build and install it.

./configure –with-oci8=shared,instantclient,/usr/lib/oracle//client/lib
make
make install

6) Add the library shared object for PHP

echo extension=oci8.so > /etc/php.d/oci8.ini

7) Start Apache

‘service httpd start’ _or_ ‘/etc/init.d/httpd restart’

Create a PHP info page and checked to see if the Oracle (oci8) driver is listed:

echo > /var/www/html/phpinfo.php


I hope this helps.

PS: These contents are borrows from url http://bigjim-network.be/2009/06/02/oracle-from-php-on-centos-5/

Pages

About Me

My photo
- A competent M.S. Software Engineer and B.E. (Comp) with 6 years of rich experience in Java/ C / C++ / Oracle/PHP/Postgresql/Mysql in IT industry.
- Resourceful in developing Applications with various platforms and different domains.
A strategic planner with expertise in designing internal control systems towards the accomplishment of corporate business goals.
- A keen analyst with exceptional relationship management skills and abilities in liaising with different clients.
- Team player with excellent analytical and communications skills.
Worked with development projects with software brands like Cognizant and Infosys
Specialties
- Master in struts
- Good hands on in core Java
- Understanding of other building blocks of Enterprise applications like middle ware technologies.
- Knowledge of database like Oracle,postgresql,mysql