ROSEBURG, Ore. — Christopher Harper-Mercer was withdrawn and quiet as he grew up in southern California, spending most of his time indoors at his mother’s apartment and deflecting neighbors when they asked him how he was doing, or why he always wore the same outfit of combat boots and green Army pants. But there was one subject that got him to open up: guns.

Mr. Harper-Mercer collected handguns and rifles, and he regularly went to a shooting range with his mother, said neighbors in Torrance, Calif., where the two lived until moving to Oregon in 2013. At a barbecue shortly before they left, Mr. Harper-Mercer spent hours talking with a next-door neighbor about guns and how he and his mother were excited to leave Los Angeles and get a fresh start.

“When we talked about guns and hunting, he was real open about it,” said the neighbor, Louie Flores, 32. “But anything about what was going on in his life, he really didn’t say too much at all.”

But two years after that fresh start, the authorities say, Mr. Harper-Mercer, 26, carried out the worst shooting rampage in this state’s history at Umpqua Community College on Thursday morning, killing nine people in the writing class where he was enrolled and wounding others. He was armed with six guns, a flak jacket and spare ammunition magazines, suggesting he expected a long siege. He had seven more guns at his apartment, officials said.

For investigators searching for his path to mass murder, he left behind a typewritten manifesto at the scene and a string of online postings that showed he had become increasingly interested in other high-profile shootings, angry at not having a girlfriend and bitter at a world that he believed was working against him.