Use KernelCheck to build the latest kernel for debian/ubuntu

I recently found this awesome project called KernelCheck that allows you to build the latest Linux Kernel for your distribution. It requires very little interaction from the user and automatically optimizes the kernel to user’s needs. Currently it only supports Debian based distributions but support for RPM and Slackware based distributions is planned. KernelCheck is build around the AutoKernel idea by PinguinZ.

Building the Linux Kernel was never easier on Debian (and derivatives) before. I just compiled the 2.6.28.1, it wasn’t a pain at all.

v4l supports Avermedia PCI pure analog (M135A)

I bought a Avermedia PCI pure analog (M135A) recently (26th December) and to much to my delight it was just plug and play on my home media center running Debian testing with custom built Linux kernel 2.6.28 (Released on 24th December). TV tuner was working with no issues. All local TV channels we accessible :).  Even the remote was working (not all but the most critical ones like volume control and channel selection are working). Since my sound card didn’t have a mixer I had to use sox to redirect the sound from the TV tuner to the sound card. Running the following at start up did the job.

sox -r 32000 -w -t alsa hw:1,0 -t alsa hw:0,0

Just in case not all required modules are loaded in your case, the required modules to use this radio tuner are:

  • saa7134
  • saa7134_alsa
  • tda827x
  • tda8290

I’m really happy that now most of the hardware I can find in local shop is just plug and play on GNU/Linux. My kudos to v4l (video4linux) and the Linux kernel developers 🙂 .

Going multi uplink

Last Friday I got a 2nd connection for my home-office. Now I have 1Mbit/s WiMAX uplink from Dialog Broadband and 512Kbit/s (Soon will be upgraded to 1Mbit/s) WiMAX uplink from Lanka Bell.

I have setup one of my old PCs as the router. I couldn’t find a single router with multi-uplink here in Sri Lanka, but PC router is more flexible, IMO. I’m running Debian on the router and using Shoreline Firewall aka Shorewall for firewalling and traffic shaping/control. It took a good few hours to setup mainly because I mixed up the ethernet interfaces 😀 . Shorewall documentation on multiple internet connections and traffic shaping/control by Tom Eastep helped me a lot in setting up my router.

WSO2 WSF/PHP with Lighttpd

I wanted to test drive WSO2 WSF/PHP on Lighttpd because I couldn’t find any documentation specific for Lighttpd, or any one complaining that it cannot be done. I set up a new VMWare image running Debian so that I can blog all the steps involved in getting WSO2 WSF/PHP working on Lighttpd running on Debian.

Step 1: Install Lighttpd, PHP5

I used apt-get to install Lighttpd and PHP5

 $ sudo apt-get install lighttpd php5 

Step 2: Download and install WSO2 WSF/PHP.

I downloaded the Debian package.

 $ axel -an 5 http://dist.wso2.org/products/wsf/php/wso2-wsf-php-1.2.0-debian.deb
$ dpkg -i wso2-wsf-php-1.2.0-debian.deb

Step 3: Enable WSO2 WSF/PHP

I created a new file /etc/php5/conf.d/wsf.ini and added the following line.

 extension=wsf.so 

Step 4: Enable FastCGI and PHP

Fastest method to run PHP on Lighttpd is FastCGI, so we will be enabling FastCGI.

 $ sudo lighty-enable-mod fastcgi

On Debian Lighttpd FastCGI configuration file contains the configuration for PHP4. We will have to edit /etc/lighttpd/conf-enable/10-fastcgi.conf to look like bellow.

server.modules   += ( "mod_fastcgi" )

## Start an FastCGI server for php5 (needs the php5-cgi package)
fastcgi.server = ( ".php" =>
((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
"max-procs" => 2,
"idle-timeout" => 20,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)

Step 5: Restart Lighttpd

You have to reload the Lighttpd configuration files.

 $ sudo /etc/init.d/lighttpd restart

You have successfully installed WSO2 WSF/PHP on PHP5 and Lighttpd. It is time to test whether it is a success. Simplest approach would be to see phpinfo() page. Create a php file with the following line of code and place it in the document root. Then using a web browser goto that URL. In the page search for wsf section. This contains all the configurations about the WSF extension.

I went throught to the trouble of actually consuming a SOAP web service to see whether this setup actually works and it was a success, but that is simply out of the scope of this post. These instructions should work on other Linux distributions with minor changes and any platform with few changes.

Fly WSO2 WSF/PHP with Lighttpd. Have fun.