pgRouting is a separate extension used in addition to PostGIS, which is now available in the PostGIS bundle on the Application Stack Builder (recommended for Windows). It can also be downloaded and installed by DEB, RPM, and macOS X packages and Windows binaries available at http://pgrouting.org/download.html.
For macOS users, it is recommended that you use the source packages available on Git (https://github.com/pgRouting/pgrouting/releases), and use CMake, available at https://cmake.org/download/, to make the installation build.
Packages for Linux Ubuntu users can be found at http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS22UbuntuPGSQL95Apt.