These commands need to install phpmd.  `pear channel-discover` is to `pear` what `add-apt-repository` is to `apt-get`.

Install manual of phpmd say that execute these commands. See URL http://phpmd.org/download/index.html.