(Reuters) - Canadian business software maker OpenText Corp <OTC.TO> said it would buy HP Inc's <HPQ.N> customer management software business for $315 million.

The business is expected to generate between $110 million and $125 million of annualized revenue and immediately add to earnings, OpenText said on Monday.

The deal comes two months after Open Text bought a set of content management software tools from HP for about $170 million.

OpenText, one of Canada's largest software companies, makes products used by businesses to manage large volumes of content.

HP Inc houses the former Hewlett-Packard Co's legacy hardware business. The company has been cutting jobs as part of a restructuring program as it looks to rein in costs.

OpenText's shares were up about 2 percent at C$76.64 in morning trading on the Toronto Stock Exchange on Monday.

Up to Friday's close, OpenText's shares had risen 44 percent over the last 12 months, while HP's shares fell nearly 10 percent.

(This story corrects seventh paragraph to say OpenText's shares had risen 44 percent, not fallen 44 percent)

(Reporting by Vishaka George in Bengaluru; Editing by Anil D'Silva and Saumyadeb Chakrabarty)