Environment: centos 5.0,php 5.1.6
Because phpize is required, php-devel is installed. phpize provides a compilation environment for PHP extensions.
wget http://pecl.php.net/get/json -O json-1.2.1.tgz
tar -xf json-1.2.1.tgz
cd json-1.2.1
phpize
./configure
make
make install
echo "; Enable json extension module" >> /etc/php.d/json.ini
echo "extension=json.so" >/etc/php.d/json.ini