Thursday, March 27, 2008

LAMP - Apache, PHP, MySQL Installation easy steps

Some like it binary some like compiling, I am amongst the compiling ones..
here are some easy steps that I usually follow to compile Apache, PHP to my machine.

  1. Apache
    1. ./configure --prefix=/usr/local/apache2.2.6 --enable-so --enable-proxy --enable-rewrite --enable-expires --enable-headers --enable-deflate --enable-ssl
    2. sudo make
    3. sudo make install
    4. cd /usr/local
    5. ln -s apache2.2.6 apache
    6. cd
  2. PHP
    1. ./configure --prefix=/usr/local/php5.2.5 --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-gd --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib
    2. sudo make
    3. sudo make install
    4. cd /usr/local
    5. ln -s php5.2.5 php
    6. Configure Apache httpd.conf for PHP module
      1. LoadModule php5_module modules/
      2. AddType application/x-httpd-php .php .phtml

Thursday, March 13, 2008

Ubuntu Server edition kernel compile make menuconfig error

I install Ubuntu 7.10 Server edition, it was nice required less resources. GUI was missing, but the resources it saved where more important than X11.
Then I wanted to install Ultra Monkey and for that I read that first kernel needs to be patched up. I downloaded the kernel source from, unzipped it and tried "make menuconfig" to my surprise it gave error and it was hard to understand.
Googling made me land on the fact that it requires ncurses-devel
I tried "sudo apt-get install kernel-package libncurses5-dev fakeroot wget bzip2"
and then "make menuconfig", now things work...

Wednesday, March 12, 2008

Ubuntu 8 Download

Ubuntu 8 is about come, beta is scheduled to be released on 20th mar, meanwhile if cannot wait ( like me ) then things can be downloaded from here
One more thing that I discovered today that its not just Mythdora alone, there are Mythbuntu and KnoppMyth also in the market, however I must mention here that my experience with Mythdora was very bad neither I liked the OS nor did the MythTV worked as decently as I thought It would.

Saturday, March 8, 2008

vi editor tips & tricks

To enable syntax hi lightening
:syntax enable

enable line number
:set number

:set autoindent

you can make a file ~/.exrc with these commands so that every time vi starts you don't have to re enter the commands

my exrc contents are ..
:set number
:set autoindent
:syntax enable

Saturday, March 1, 2008

url rewriting in java & php

A lot of time we need to re-write URLs from dynamic to static, the reason may be security or SEO, but we keep needing it from time to time
I had done the same in PHP applications that I had build using mod_rewrite ( a module that can be compiled under apache httpd). Recently I was asked to do the same with an application running on Tomcat server I found an easy way to do it.