Skip to main content


Showing posts from 2007

Converting phpBB2 to phpBB3

phpBB is my favorite bulletin board system. After 4 years running on phpBB2, I tried to convert my board to phpBB3 RC7 (this is the latest at the time of writing). My phpBB2 version was 2.0.21. I read many in phpBB community forums, many people had some kinds of problem in conversion with the built-in convertor. I tried it myself and failed for 3 times. The problem was connection timed-out during conversion. Googling a bit, I found a solution. Thanks for the problem solver. You are a hero!. :-) Check it out here. This is how I did it:

Open phpbb3/install/install_convert.php

Find these lines:

* @package install
* @version $Id: install_convert.php,v 1.53 2007/10/11 08:12:25 acydburn Exp $
* @copyright (c) 2006 phpBB Group
* @license GNU Public License


After those lines, add:
@ini_set('memory_limit', '256M');
@ini_set('upload_max_filesize', '128M');
@ini_set('post_max_size', '…

apt-get: dynamic MMAP out of room

Recently after upgrading wine and a few other packages, apt-get threw errors like these:

Reading package lists... Error!
E: Dynamic MMap ran out of room
E: Error occurred while processing libedataserverui1.2-6 (NewFileVer1)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

I also could not use apt-cache and it threw the same error messages. The solution is just one-liner:

APT::Cache-Limit 12582912;

put that line in /etc/apt/apt.conf . It solved the problem at least for me. :-)

If it still hasn't solved the problem, try increasing the cache-limit value.

fail2ban - Yet another tool to protect your server

What is Fail2ban? Fail2ban scans log files like /var/log/auth.log or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address. These rules can be defined by the user. Fail2ban can read multiple log files such as sshd or Apache web server ones. You need python >= 2.3, gamin >= 0.0.21 (optional) and one of these : iptables, shorewall or tcpwrapper. What does the version number of Fail2ban mean? The structure of the version number is major.minor.revision. Currently the major number is 0. The policy for minor is: odd numbers (0.5, 0.7, etc) are development versions. even numbers (0.6, 0.8, etc) are stable versions. Fail2ban is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Where can I get it? fail2ban source can be downloaded from here. …

apt-get remove Fedora; apt-get install Debian

After giving a thought about possibility of converting my Fedora box to Debian,yesterday morning, with DVD I got from LFY, I gave it a try. Why? I fed-up with problems like crippled mp3 support (for obvious reason for a pure OSS distro),slow and error-prone yum and problem with incompatible and conflicted packages from 3rd-party repositories. My journey with Fedora has ended. Maybe I'll meet her again in the future :). We'll see.

Debian 4.0 aka Etch
Installation went smooth in text mode. It took longer as I was expecting because without my knowledge,I opted to download updates from internet during installation. There was a flaw when I tried installing LILO boot loader. The installer said it failed to install. I opted to continue and after rebooting, the boot loader was fine. GNOME was the default Window Manager installed when I select the Desktop installation but as usual, with beloved apt-get, I could install other window managers too.

Some basic commands
apt-get update <--- f…

Compiz on Slackware

I installed Slackware 12.0 on an old laptop (P3 , 256 MB RAM). This laptop has no CDROM and No Floppy drive. I installed it using PXEBOOT install method introduced in Slackware 12.0. It means, I have to boot from network card to get Slackware's installer running (Disk 1). Installing packages can be done using NFS. I'll story about that next time. :-)

The laptop's vga is i830M. I can use whether i810 or intel for the driver of xorg. To run compiz was a bit tricky for this chipset. After googling for awhile, I managed to get it running good. Your mileage may vary though.

Command to run compiz :
LIBGL_ALWAYS_INDIRECT=true compiz --replace ccp && emerald &

Note : emerald is the window decorator I have chosen to run. There are other window decorators but emerald is one of the famous.

KSalup - Winpopup for Linux

Searching popup messaging application for Linux is not hard. Kopete has the feature but the default installation fails in receiving message. Sending message works though. Due to this problem, I try to find another application that can send and receive winpopup message via SAMBA.

Enter KSalup. I couldn't find this package in major Fedora repositories. However, it can be downloaded from the project's download page. After installation, entering basic settings like WORKGROUP, HOSTNAME, ways to find other hosts in LAN, one can use it straight away. Sending and most importantly receiving are OK. However KSalup lacks of add-on feature like some of other winpopup-like applications have, that is sending files.
Put that feature aside, KSalup is a nice winpopup application for Linux. At least you can send and receive messages with your friends who using Windows in your LAN. By not connecting to IM servers outside like Yahoo!, Google Talk, IRC or MSN, one can save a little bit of bandwidt…

Restoring grub

Recently, I installed RHEL first with 3 partitions(/, /boot and /home) and I also created one FAT partition for installing Windows XP. After installing RHEL, I installed MS Windows XP. This left grup being replaced by MS Windows boot loader in MBR. How to restore grub?

Restoring grub boot loader should be trivial if you have the installer CD. In case of RHEL (or Fedora or CentOS), what you have to do is by inserting disc 1 of RHEL disc sets and type linux rescue. After answering a few questions, you will be dropped to console. What next? Type grub-install /dev/hda. This command will install grub boot loader into MBR.

Before this I have been googling for about an hour. The answers I found always like this:

1. chroot /mnt/sysimage
2. /sbin/grub-install --recheck /dev/hda

I had error with those steps. Step 1 means to change your root dir to installed partition which is mounted under /mnt/sysimage directory. If you have no luck, skip step 1 and go straight to step 2. Good luck!.

RPM hung on me

Couple of days ago, I killed yumex because it hung. Afterthat, everything hung. I couldn't run rpm or yum in command line. I tried rebuilding the database with rpm --rebuild but to no avail. Found a solution after googling. The solution :

rm /var/lib/rpm/__db.*

The above command removes any locks left on the rpm database and now you should able to use rpm command. Make sure you run the above command as root for obvious reason.

Upgrading to latest clamav for impatient sysadmin :)

I've just upgraded clamav to the latest (at the time of writing is version 0.91.1) for my firewall (Mandrake 10.1). For impatient sysadmin like me, waiting for official packages to release might take longer than u might expect. So the best way to upgrade is by compiling from source. This was how I did it.

Stopping the service
It's advisable to stop clamav service before installing the new one.

service clamd stop

Downloading the package

Extracting the package
tar xzvf clamav-0.91.1.tar.gz

cd clamav-0.91.1
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-id-check --enable-dns-fix --enable-bigstack

Note: this configure arguments matching with the previous installation by rpm except for --enable-big-stack and --enable-dns-fix (I think).

Compile and install
make install (as root)

Restart the service
service clamd start

Updating the virus database definition

Checking clamav …

Writing a blog entry has never been easier

This blog entry was created using Gnome Blog. Without going to, I can now write an entry by just opening this application. It's good to have this kind of app don't you think? Oh, you can insert pictures too by way of drag and drop (look at cutie meowie below :) ). --update: you can't see the picture because BloggerAPI doesn't support it (yet).

Where to get it?
You are recommended to use your distro's package manager. Just search for gnome-blog or something like that. In Fedora just run yum install gnome-blog.More info can be found here.

dbmail 2.2.6-rc1 released

I have just upgraded my dbmail to dbmail 2.2.6-rc1.

Announcement :
Changelog :;a=log;h=dbmail_2_2
Download :

How to upgrade from previous release (2.2.5)

1. Stop postfix, dbmail-imapd, dbmail-lmtpd and dbmail-timsieved using service command.
2. Download the tarball and extract it.
3. Enter the installation folder and run :

./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-mysql --with-sieve

4. make
5. make install
6. Restart all the stopped services.

That's all there is to it.

df - A disk usage reporting tool

What is df?
It is a command to report filesystem disk space usage (on Linux).

Recently I checked my backup server's disk space. I issued df for that. The output was:

df: cannot read table of mounted filesystems: No such file or directory

Something wrong here. After some googling, I managed to get the solution. I issued this command:

grep -v rootfs /proc/mounts > /etc/mtab

After running this command, df worked again. One lesson learned. df relies on /etc/mtab for it to work. Now I can easily know how much disk space left for each partition. Thanks df!.

Compiz Fusion - the merge of Compiz and Beryl

What is Compiz Fusion?
Compiz Fusion is an extension of the Compiz compositing window manager for the X Window System. It was created from the remerging of Beryl into Compiz. It aims to port almost all of the features of Beryl to Compiz plugins, and continue to improve Compiz's core functionality.

Some screenshots (taken from my desktop):

This package is not officially included in main repository of Fedora. It is even conflicts with the official compiz package. For Fedora users, you can install it through yum with kageshensi's repo. Instructions are in there. Ubuntu users may want to check Ubuntu Forum for more info. Click here for a start.

Converting video and extracting audio from a video

Converting video formats into another
To convert mkv format to dvd format:
ffmpeg -i myfile.mkv -target dvd -copyts -aspect 16:9 myfile.mpg
To convert mp4 video to avi:

mencoder video.mp4 -ovc lavc -vf scale=352:288 -oac lavc -o video.avi

To convert avi to mpeg video:

ffmpeg -i video.avi -target pal-vcd video.mpg


ffmpeg -i video.avi -target pal-vcd -s 352x192 -padtop 32 -padbottom 32 video.mpg

Note: -target pal-vcd is for PAL. For NTSC, use -target ntsc-vcd. -padtop 32 and -padbottom 32 will add black padding at the top and bottom.

In certain cases, if you have problem with de-sync audio for the resulted mpeg, try using mencoder like this for PAL format VCD:

mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=xvcd -vf \
scale=352:288,harddup -srate 44100 -af lavcresample=44100 -lavcopts \
vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 25 \
-o movie.mpg movie.avi

More options can be found here.

To convert a…

yumex - yum extender

Installing a package in Fedora using yum is good. It is faster than pirut or pup in GUI. I discovered yumex a while ago. Installing it was trivial :

yum -y install yumex

It is a GUI-front-end for yum but faster than pirut or pup. The Ouput View gives you "what's going on'. I just love it. Try it!.

To make installation packages faster with yum, I highly recommend you to install the following yum plugins :
yum-fastestmirror (yum install yum-fastestmirror)
yum-skip-brokenTo see other plugins for yum, please run this command: yum list "yum*"

Capturing video off your desktop with xvidcap on Linux

What is xvidcap?
It is a small tool to capture things going on an X-Windows display to either individual frames or an MPEG video. On Windows machines there are commercial tools like Lotus ScreenCam or Camtasia. From my experience, new user will take some time to take off with a video. I just think it needs more work on user-friendliness.

Where to download?
If you use Fedora, you can install with yum: yum install xvidcap
If u use Ubuntu or Debian, you can install with apt-get : apt-get install xvidcap
or for advanced user, you can download the source code here.

My desktop
Below is a video off my desktop I took with xvidcap. On the video, you can see that I was showing off Compiz. :)

Dansguardian - web content filtering for all

What is dansguardian?
(Excerpt from dansguardian's website)

DansGuardian is an award winning Open Source web content filter which currently runs on Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, HP-UX, and Solaris. It filters the actual content of pages based on many methods including phrase matching, PICS filtering and URL filtering. It does not purely filter based on a banned list of sites like lesser totally commercial filters. DansGuardian is designed to be completely flexible and allows you to tailor the filtering to your exact needs. It can be as draconian or as unobstructive as you want. The default settings are geared towards what a primary school might want but DansGuardian puts you in control of what you want to block. DansGuardian is a true web content filter.
Where to download?The latest beta when this article is published is Download it here. Beta doesn't mean it is unstable. From my experience, it is a very reliable piece of software. Downloading source code a…

Repositories for Fedora Core 6

Fedora Core is in rapid development. Repositories or in short repos (plural of repo) are servers which provide packages for Fedora Core users to install and update packages. For those who likes to live on the edge should enable testing repo. For newbie, you can use pirut or go to Application --> Add/Remove Software and enable the testing repo. Be warned that the packages provided are not stable. They can even make your computer system hang and your CD drive burnt ;). I don't like it. I like everything to be stable and I have experienced how it was to be living on the bleeding edge. Things were not that good. :D

Beside core, updates and extras repositories, you might need to add livna and kde repositories too. These sites provide non-free/proprietary packages like mp3 support and proprietary display drivers (ATI and NVIDIA). The kde repo stated above provides unofficial kde packages from kde community itself. The packages comes as updates for the packages provided by official Fed…

Setting up wireless with Mandriva 2007

I rarely install Linux on laptop. It was great to have one and saw how Linux distros progressed in this area. Since last week, I have been a responsible person for one of my office's laptop. I tried installing Fedora Core 6 on it. It was no good. After a couple of minutes, it started to become slower like something was going on in the background. It was so annoying. I tried upgrading the kernel and all the latest updates using yum but to no avail. Of course your mileage may vary.

Mandriva 2007
With Mandriva 2007, I was in luck. I got the DVD from LinuxForYou magazine. I am no stranger with Mandriva. I have been using it for 5 years and one of servers I managed using it. As any desktop-oriented distros, Mandriva is one of the user-friendliest distros out there. It is good and will be better in the future.

My laptop is Intel-based. What i mean here is the wireless, CPU and VGA chipsets are from Intel. My wireless is ipw3945. No driver for this chipset I could found in the DVD. …

Setting up a printer with CUPS

Printing with Linux has never been easier with CUPS. I had bad experience long ago with lpr and lprng before when printer support was still scarce. Nowadays, setting up a printer on Linux is like a 'walk in the park'. Thanks to CUPS.

HP LaserJet 1020
In my office, my pc is the only pc running Linux (FC6 to be specific) and the others are (you bet!) Windows (XP Pro Edition to be specific). My colleague sitting nearest to me is a webmaster. Her pc is connected to an HP LaserJet 1020 printer and shared with name HP1020.

Get ready the required packages
I need to print to that printer. So I decided to install SAMBA and CUPS packages for that purpose.

Finding the driver
DON'T use the driver for this printer packaged with FC6. It won't work. I tried it but I think you must try it too to prove me wrong. Of course YMMV. The driver is here. Before that, you have to read what the author's have to say on the website. It's important!. Follow the instructions on how to compile and…

Setting up webcam on Linux (ZC0301)

It was a rare occasion if I got my hand on a web camera. This time I borrowed it from my colleague. Last time I couldn't get it to work. I didn't remember why. But this time, it was easy as ABC.

Model : Z-Star Microelectronics Corp. Havit 3808 (this is what it says on the tin)
Chipset : ZC0301 (from lsusb)

Last time I looked at for the driver. It has been inactive for a long time. Still so far, the driver for ZC0301 is still not supported.

This time: I looked at spcaxx project page at The webcam I was using supported. As stated on the website, for Fedora Core 6 users like me can download the driver here. The driver is actually a kernel module and after installing it, you can load the module with modprobe : modprobe gspca

When done, open your kopete, and click Settings --> Configure.. --> Device and see whether it detects and display video from the webcam. Then you can enjoy webcam session with your frien…

postfix - mailbox size limit and message size limit

postfix is my MTA of choice. I use it for my mailserver because its simplicity , security and sendmail-compatible (the widely used smtp in the world but not as secure). It is also extensible by plugging other servers for various purposes (antispam, antivirus,database etc).

I had one problem with file attachment larger than 10MB. Users couldn't send it although I have setup squirrelmail (SM) to be able to attach files summed up more than 20MB and I had modified php settings as per here. The problem was not in SM setting. It was postfix. By default, attachment size that can be sent by postfix is 10MB ~ 10240000 byte. How did I know it? I looked in log file (for my system it is in /var/log/mail/errors. For other system, the file to look is /var/log/maillog). The line looked like this:

Feb 26 16:30:53 webmail postfix/sendmail[30775]: fatal: Message file too big

Open /etc/postfix/ with a text editor of choice and find message_size_limit directive an…

Tips for MySQL

MySQL is the most popular database in the world. I'm not doubt about it. Most of forums, portals and web-based database applications use it as the back-end engine.

Some tips of using MySQL on Linux

Login to MySQL using mysql client in console/terminal:

mysql -u username -p dbname


mysql -u username -ppassword dbname

or (using current username to log in)

mysql -ppassword dbname

security tip: username root is the default administrator. Do not use it in a live environment. Create a new one and set the appropriate permission for it.

Create a new database:
mysqladmin -u username -ppassword create databasename

(username is the administrator username that able to create a new database ie root)

or you can log in to mysql using mysql client in console. Example:

//create table with myisam engine.

CREATE TABLE mytable (
value_a TINYINT

//create table with HEAP engine.

CREATE TABLE mytable (

yum - 'yummy' package management for Fedora Core

As a Mandriva (aka Mandrake) user, I used to use urpmi to install, urpme to remove and etc2 for package management. As a Slackware user, I used to use slapt-get and in Fedora, I am learning yum. I love it but in commandline. Why? because it is faster that way than using the gui front-end. I don't know why but they need to improve its speed.

Some useful examples of usage :

Check available updates (without installing anything) : yum check-updates
Check updates and install : yum -y check-updates
Search for a particular package using wildcard : yum list "ogg*"
Installing particular package : yum install ogg-vorbis.blablaba.fc6.rpm
Upgrading a package : yum update ogg-vorbis.blablaba.fc6.rpm

Default repositories provided by FC6 is good enough but lack of commercial and copyrighted packages. You need more than that. Notable repositories are freshrpms and livna. I personally added freshrpms as one of the repositories used by yum to install xmms-mp3, mplayer, dvdrip and some other pac…

On a quest to get a 3D desktop part 2

You might still wondering whether i am still on a quest to get a 3D desktop? Not really. After reading an article of Fedora Core 6 in LinuxFormat magazine, I thought I need to give it a try. Firstly, I tried it on a laptop with built-in graphic card Intel 915. It ran smoothly. 3D effects for compiz and beryl worked out of the box. I just had to activate it.

After too much coin tossing and coffee, I decided to give FC6 a try on my office's PC. After backing up all important files, I inserted the DVD and rebooted into the nice Fedora installer a.k.a anaconda. I decided to repartition my drive to give larger part for my / partition and created 3 more partitions for /home,/boot and of course a /swap. As a rule of thumb, /swap size is 2 times RAM size.

GNOME is some sort of 'official' window manager for Fedora and RedHat. That's why after booting into X, GNOME was loading. To get 3D effects, click on System -> Preferences -> Desktop Effects. This was compiz actually loa…

Google search tool collections

Googleindexes and searches billions of webpages and is the premier search engine on the internet. A quick analysis of the search pageessentials of Google Search and remember to set your preferences. is helpful to understand and analyze the search results. Official Google Search ToolsGoogle - The Search Engine. Google Advanced Search - search google based on specific parameters Google Suggest - As you type into the search box, Google Suggest guesses what you're typing and offers suggestions in real time. Google Trends - Graphically see and compare what the world is searching for. Google Personalized Search - make your search experience more relevant to you. Google Search History - Keeps a record of all searches and clicked results while a user is logged into a Google Account Google Blog search - Google search technology focused on blogs Blogger Blog Search - Search for blogs all over the web Google Directory - Search the web organized by topic into categori…