LAMP How To – Open Source At Work

Only Passion Matters

Entries for August, 2009

PHP: manual install of pear

Sometimes, certain php apps require certain packages to be installed via pear.
Use yum if given a choice, ie “yum install php-pear”.
If yum is not available or due to whatever reason, We need to manually install a new version from pear website.
elinks -source http://pear.php.net/go-pear | php

// follow thru the prompts. then configure the installation parameters

Below is [...]

Read windows ntfs file system in linux

1. get rpmforge repo (google rpmforge).
2. install packages

yum install fuse-ntfs-3g dkms-fuse

3. if using xen, need to add kernel-xen-devel, ie

yum install kernel-xen-devel

4. Load fuse module in kernel

chkconfig dkms_autoinstaller on
// now start the program manually
/etc/init.d/dkms_autoinstaller

5. now mount the ntfs partition

mount /dev/source /dev/target
// or
// ntfs-3g /dev/source /dev/target

Quick script to sort mysql database/tables based on table size

Mysql can show the table status with the row and size for each table but doesn’t do sorting. We can however store each row in an array and sort the array.
I am too lazy to write a script for it. 2 x for loops does the trick. This script is from adamyoung.net. Just run the [...]

Intel CPU that supports hardware assisted virtualisation

I found this link today:
http://ark.intel.com/VTList.aspx

This is magical. Now we know what cpu to get right away.
and we can check the hardware compatibility here:
http://processormatch.intel.com/CompDB/

Getting new packages from Centos Dev Repo

Certain newer packages like php 5.2 (actually this is not new) is still not available in the latest version of centos. If you are working with zend framework, you know you need the latest php version. What can you do? Install the dev repo.
create the file /etc/yum.repos.d/centos-test.repo
then append these lines to it

[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/5/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing

then disable the [...]