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 >= 18.104.22.168, version <= 22.214.171.124, excluded versions: 126.96.36.199), downloaded version is 188.8.131.52
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.