How can I add the custom taxonomy categories to the posts and pages?

All what you need to do is just pass required post types as array in the second parameter for register_taxonomy function call:

add_action( 'init', 'wpse8170_init' );
function wpse8170_init() {
    register_taxonomy( 'my-taxonomy', array( 'post' ), array(
        ...
    ) );

    // or call this function if your taxonomy is already registered
    register_taxonomy_for_object_type( 'my-taxonomy', 'page' );
}