The Magento Connect Manager is actually a web frontend for pear installations, so both methods operate the same way. For the general instructions on these methods, see the Magento wiki on Upgrading Magento.
From both methods, you might get an error message saying:
magento-core/Lib_Varien requires PHP extension "mcrypt"
And then following, many error messages including “[…] cannot be installed, conflicts with installed packages”, for example:
magento-core/lib_varien requires package "magento-core/Lib_ZF" (version >= 184.108.40.206, version <= 220.127.116.11, excluded versions: 18.104.22.168), downloaded version is 22.214.171.124
magento-core/Lib_ZF cannot be installed, conflicts with installed packages
If you do, this is because you do not have the PHP “mcrypt” extension installed. Install it, in Ubuntu on a root server or virtual server by executing:
apt-get install php5-mcrypt;
Then try again. There is no need to re-start Apache for this to work.