How to install PEAR and PHPUnit in Debian/Ubuntu

In general terms, it’s very easy to install/upgrade new software in APT distros such as Debian/Ubuntu.

I don’t want to say doing so for PHPUnit or PEAR is more difficult, but has a little, tricky part, upgrading PEAR. If you don’t upgrade PEAR, PHPUnit will complain about an insufficient version and the installation will abort.


sudo apt-get install php-pear
sudo pear channel-update
sudo pear upgrade pear
sudo pear channel-discover
sudo pear channel-discover
sudo pear channel-discover

sudo pear install -a phpunit/PHPUnit

Additionally, if you want to include code coverage in your tests, you have to install the xdebug PHP extension.

sudo apt-get install php5-xdebug

Happy testing!




注册之后会提示:Registration Successful. Mail was sent to contact address:


Your account has been created with the following details:

Username:        用户名

Password:        密码

To log in immediately, follow this link, using your username and password:

You can start using hyperVM/Lxadmin without making any payment. You will be sent a paypal invoice later for the actual licenses you create in the system, for a flat fee of 50cents/vps/month for both lxadmin and hypervm together.

number_of_servers: Unlimited
number_of_domains: Unlimited
number_of_monitored_ports: Unlimited
number_of_Vpses: Unlimited

You can download lxadmin/hyperVM from
For help regarding Lxadmin/HyperVM installation, please see
Flash Demo Help for License Management, Please see,

Visit our forum to clarify any issues you have with Lxadmin/HyperVM

输入邮件中的用户名和密码登录,点击Kloxo Licenses如图

然后点击Add Kloxo License



点击Update License From Lxlabs