Two elementary schools and the north Raleigh campus of Wake Technical Community College were locked down for more than two hours Monday morning after a man carrying a rifle was spotted near one of the schools.