French ocean carrier CMA CGM has agreed to sell a 49 percent stake in its Terminal Link ports unit to China Merchants Holdings for 400 million euros ($540 million).