A major earthquake with a preliminary magnitude of 7.2 has triggered a tsunami warning for the southern Alaska peninsula.