President Carter gave the green light today to an immediate start on his 1980 New Hampshire presidential primary campaign, aimed at heading off any serious challenge in the nation's first primary.

The decision was reported by Chris Spirou, minority leader of the New Hampshire House of Representatives, who met privately with the president just before Carter left the site of the Democrats' midterm conference here.

Spirou said Carter agreed it would be wise to "put together an effort now to make sure he has support in New Hampshire for his reelection -- should he seek it."

He said the move had the backing of Gov.-Elect Hugh Gallen, a longtime Carter friend who takes over in January as the first Democratic governor of the Granite State in six years.

Spirou, who led the 1976 campaign for Sen. Birch Bayh (D-Ind.) when Carter won New Hampshire, said he told Carter it would be wise to "have a preventive effort" aimed at warding off nay challengers, "rather than a remedial effort" after a challenge appears.

"I told him there is a natural tendency for some Democrats to challenge those in authority -- even when they have demonstrated great competence," Spirou said.

There was no immediate comment from presidential aides, but the meeting had been set up by Carter's political assistant, Tim Kraft, after Carter phoned two days ago to congratulate Spirou on his reelection as party leader.

Gallen said in a separate interview he was uncertain about the specifics of Spirou's plan. "It's pretty hard to prevent someone else from running in New Hampshire," he observed.

Jean Wallin, along with Gallen a leader of the 1976 Carter drive, said she learned of the Carter-Spirou meeting only after it occurred.

Last summer, Spirou was one of several New Hampshire Democratic leaders who had predicted problems for Carter if Sen. Edward M. Kennedy (Mass.) decided to challenge him in New Hampshire in 1980.

But Gallen's victory over three-term Gov. Meldrim Thomson (R) last month put a staunch Carter ally into the leadership of the party. He is likely to be a key figure in the leadoff presidential primary, in view of Sen. Thomas J. Mclntyre's November defeat and Sen. John Durkin's possibly tough reelection fight in 1980.

Gallen said he planned to meet with Carter in Washington soon after the first of the year, and added: "My position on his candidacy is well known to the president's staff aides. I don't have to have a meeting with him to tell him of my support."

Spirou said that, as of now, "I don't think anyone of substance" in the New Hampshire Democratic Party is supporting another candidate.

However, three of the state's delegates to the mini-convention did accept a breakfast invitation from Llewellyn Warner, one of three Californians who has been circulating among delegates here to test the reaction to California Gov. Edmund G. (Jerry) Brown.

Warner, who traveled with Brown in his 1976 presidential bid, said the breakfast discussion was "just getting to know people." Two senior Brown aides, 1974 gubernatorial campaign manager Tom Quinn and Washington representative Josiah Beeman, said they were answering questions about 1980 by telling people the governor has not made up his mind.