The shortest (and recommended) upgrade path to Moodle 3 generation is 2.0 > 2.2 > 2.7 (LTS) > 3.1 (LTS), always the final release. For a summary of software requirements along the path see http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases, which Ken posted already.
Installing and upgrading help
Upgrading Old Version
This discussion has been locked so you can no longer reply to it.