Install Git From Source On Linux

If you are like me and want to install git-core core from source instead of one to the many binary packages out or you just have a distro that does have a binary for it. Here is what you will need to get it installed.

  • POSIX-compliant shell
  • GCC – gnu c compiler
  • GNU Interactive Tools
  • Perl 5.8 or Later
  • Openssl
  • Openssh
  • zlib
  • libcurl
  • expat

Once all you have verified or install on the required packages. You can download the source from Git Homepage.

shell$ wget http://git-core.googlecode.com/files/git-1.x.x.tar.gz

shell$ tar -zxf git-1.x.x.tar.gz

shell$ cd git-1.x.x

shell$ ./configure –prefix=[install_path]

shell$ make all

shell$ sudo make install

A little old school and not the hard.

Resources:
http://git-scm.com/
http://ruby.about.com/od/git/a/2.htm

Here is what happens when I recovery from surgery.

After being told that I would need to take five days to recovery from a recent surgery and being informed that they would prefer me not to work on any of the system at work well under the influence of pain killers, I started looking for thing to kill time.

Well trying to find something to do for 5 days and not having much luck, I was surfing the web using Google’s Chrome Web Browser, I started looking at their “New Tab Apps Feature” or whatever it’s called. I started thinking that would be really simple to create a web based version of the application that did roughly the something, but wasn’t dependent on the web browser. It would also be handy for all those table devices that have web browsers. It’s kind of a pain to hit those little links with fat fingers like mine. After doing a quick design in my head, I figured what the heck; I got nothing better to do.

I decided to go old school LAMP on it with Linux, Apache, MySQL, and PERL. I decided to use mod_perl and MASON as my frame work, MASON being a throw back from my short stent at Amazon.com. I went with the old MVC architecture, since it’s the easiest for a one node system and because of my state of the art Dual Pentium Pro 180 MHZ, with 256G of RAM, and 14G 5400 RPM Hard Drive for the server that I was building it on.

After 5 days, a few additional week nights and Saturdays, here is what I came up withhttp://www.myapplinks.com. It is still in the Alpha/Beta stage by not a bad start.

Slacking over the Holidays

So December was an interesting month for me, with a few changes in my personal career and the holidays. I take a week off. Which of course lead me spending two weeks catching up on work and to top it off my boss or someone above him decided that we need to take look at a our service architecture. So of course I am now in research mode, which should hopefully lead to some good blog post. Stay tuned.

Connecting PHP to An Oracle Instance on RedHat or CentOS 5

Here lately it seems that everyone wants to connect to Oracle, but I have to admit this was the first time someone asked me to get PHP to talk to Oracle. It was a lot less painful then I thought it would be, so here is what I did.

A long with the standard PHP RPMs you need to install a couple of additional RPMs from Oracle. These are oracle-instantclient-basic and oracle-instantclient-devel which can be downloaded from http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html. You will also need php-oci8 RPM which can be download fromhttp://oss.oracle.com/projects/php/files/EL5/.

So after you have downloaded the RPMs go a head and install the packages and create the symlink for libcIntsh.so.

$ rpm -Uvh oracle-instantclient-basic-##.#.#.rpm
$ rpm -Uvh oracle-instantclient-devel-##.#.#.rpm
$ cd /usr/include/oracle/##.#/[client|client64]
$ ln –s libclntsh.so.##.# libclntsh.so

Now you are going to want to setup you environment settings, It is important to set all Oracle environment variables before starting Apache or running a PHP script,  so that the OCI8 process environment is correctly initialized. Setting environment variables in PHP scripts can lead to obvious or non-obvious problems. You can also add Instant Client library path to /etc/ld.so.conf.

$ LD_LIBRARY_PATH=/usr/lib/oracle/##.#/[client|client64]/lib:${LD_LIBRARY_PATH}
$ export LD_LIBRARY_PATH

And now for the big finish. Here is a simple connection script to test it all out.

<?php
$c = oci_connect( ‘USERNAME’,
‘PASSWORD’,
‘SERVERNAME:PORT/SERVICE_NAME’, INSTANCE_NAME’ );

if( $c ) {

$s = oci_parse( $c, ‘SELECT TABLE_NAME FROM all_tables’ );

oci_execute($s) ;

while($res = oci_fetch_array( $s, OCI_ASSOC) ) {

echo $res[‘TABLE_NAME’] . “\n”;
}

}
?>

For a complete list of function and additional install resources check out the following sites:

http://php.net/manual/en/book.oci8.php
http://wiki.oracle.com/page/PHP
http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html