A pasteurizing plant includes at least two pasteurizing lines. A heating device of a heat pump is used to heat a heating liquid, and a cooling device of the heat pump is used to cool a cooling liquid. Based on heating and/or cooling demand in the pasteurizing lines, the heated heating liquid and/or the cooled cooling liquid each are used to heat respectively cool process liquid of the pasteurizing lines. A method operates the pasteurizing plant.