Installs and configures pagination.