A 6.3 magnitude earthquake rattled the coast of Peru early on Monday, causing minor injuries, authorities said.