I don't think it's necessary as you are using Ubuntu OS which contains ready to use repository with thousands of packages for each purpose. It's simple:
Remember, that user account which is going to be used for installation must be administrator of OS.
- either go to in top panel menu to "System > Administration" and start "Synaptic Package Manager" if you have Ubuntu with GUI, then find package php-pear and install it,
- or in shell type command "sudo apt-get install php-pear".
Could be, that Ubuntu OS will ask you to install some other packages in case that "php-pear" depends on something you have not currently installed on it.
Great on this progress is that there are plenty of such packages for php and wired technologies you can just install out of the box. Further more, each of them is tested, so you will not spend days with its integration to the rest of environment.