FILE - This Aug. 15, 2017 file photo shows Boston Red Sox's Eduardo Nunez celebrating with teammates during a baseball game against the St. Louis Cardinals in Boston. The Red Sox have re-signed Nunez to a one-year contract with a player option for 2019, giving them another proven second baseman to fill in while Dustin Pedroia recovers from knee surgery. Nunez’s deal was done on Sunday, Feb. 18, 2018, the day before the Red Sox hold their first full-squad workout of spring training. (AP Photo/Charles Krupa, file)
FILE - This Aug. 15, 2017 file photo shows Boston Red Sox's Eduardo Nunez celebrating with teammates during a baseball game against the St. Louis Cardinals in Boston. The Red Sox have re-signed Nunez to a one-year contract with a player option for 2019, giving them another proven second baseman to fill in while Dustin Pedroia recovers from knee surgery. Nunez’s deal was done on Sunday, Feb. 18, 2018, the day before the Red Sox hold their first full-squad workout of spring training. (AP Photo/Charles Krupa, file) Credit: Charles Krupa

FORT MYERS, Fla. — Dustin Pedroia knew this would be the deal after knee surgery in the offseason. The Red Sox second baseman will be missing from Boston’s opening-day lineup for the first time in 12 years.

The 34-year-old former AL MVP had cartilage restoration procedure in late October and it’s expected keep him sidelined until May. He also understands that the surgery was important for his post-baseball life.

“I think mentally I’m focused on the rehab stuff they give me and try to be the best at that,” he said outside the spring training clubhouse before workouts on Saturday morning.

“I’m not looking ahead. It is a process. You have to stick to it. If you go outside, that’s when you can get in trouble,” he said.

Limited to 105 games last season due to the troublesome knee, the 2008 MVP hit .293 with seven homers and 62 RBIs.

Going into the offseason, he listened to advice and knew what he had to do.

“I don’t feel (pain) anymore. I think that’s why the decision to have the surgery was important,” he said. “If I didn’t, it would be kind of an issue. My knee doesn’t hurt like last year, waking up and walking around was painful. It’s not fun to live your life like that.”

Pedroia explained that the surgery, performed by Dr. Riley Williams III in New York — was similar to what former NBA player Amar’e Stoudemire had. He said the doctor told him it was “basically to give you tread on your tires.”

The infielder rehabbed near his offseason home in Arizona and spoke to other NBA players who had similar surgeries. He also said the rehab process is long, but he feels like he’s ahead of schedule.

“I’m still excited and ready to go,” he said. “It’s just that they kind of have to look at the big picture and make sure I’m healthy through the remainder of my career. I appreciate that.”

When he gets back into the lineup, he said that he’s looking forward to playing for new manager Alex Cora. The pair had adjacent lockers when Pedroia became the team’s full-time second baseman on the 2007 World Series-winning team during his rookie season.

“His locker was right next to mine. His job was to teach me everything, basically,” Pedroia said. “I always knew he would be a manager just the way that he views everything. Everything I do in baseball, he basically showed me how to do. I owe so much to him for how he helped me.”

One of the things Pedroia discussed on Saturday was the belief that the team lacked leadership last season after David Ortiz retired following the 2016 season. He thinks the young nucleus of players — Mookie Betts, Jackie Bradley Jr., Xander Bogaerts and Andrew Benintendi — will develop leadership qualities — as he did as he matured.

“Our core group — guys that we say are young — it’s my responsibility,” he said. “We need them and they need me. It’s not one leader. Everybody has to work together.”

But, for now, he’ll mainly be working on getting back on the field.

“You put your head down and do what you’re told,” he said. “It’s long days. It’s worth it.”

SOX RE-SIGN NUNEZ — The Red Sox have re-signed infielder Eduardo Nunez to a one-year contract with a player option for 2019, giving them another proven second baseman to fill in while Pedroia recovers from knee surgery.

Nunez’s deal was done on Sunday, the day before the Red Sox hold their first full-squad workout of spring training. He gets a guaranteed $6 million, according to multiple reports, including $4 million this season and a $2 million buyout. Nunez can reportedly exercise a $4 million option for 2019.

The 30-year-old batted a career-high .313 with 33 doubles and 12 home runs over 114 games last season between San Francisco and Boston. After being acquired by the Red Sox in a trade on July 25, Nunez made 25 of 38 starts at second base. He also hit eight homers in only 38 games for Boston.

“The time I was here last year was amazing,” Nunez told reporters at the team’s facility in Fort Myers, Florida. “There was a lot of energy, and I love to win. I think that’s the best thing, my first choice by far.”

Nunez was limited by a knee injury himself down the stretch last season, appearing in only two games after Sept. 9. One of those was in the AL Division Series.

A native of the Dominican Republic who was signed by the New York Yankees in 2004, Nunez was traded to the Minnesota Twins in 2014. There he found more playing time at his natural shortstop position and made his first All-Star team in 2016. Then he was traded to the Giants a few weeks later. Nunez has played almost as much third base as he has shortstop over his eight-year major league career. In addition to second base, he has also played left field, right field and designated hitter.

To make room for Nunez on the 40-man roster, the Red Sox designated right-handed pitcher Ben Taylor for assignment. Taylor was on the opening day roster last season and posted a 5.19 ERA in 17⅓ relief innings.

NOTES: Hall of Famer Pedro Martinez has been in camp working with some of the pitchers. “Anytime Pedro comes up to you and has something for you, you listen,” right-hander Rick Porcello said. “Obviously, he knows more about pitching than pretty much anyone on the planet. We just talked about little stuff; footwork and the beginning of my delivery that can help me get into better position to deliver the ball.”