Cross section measurements for heavy-ion collision processes require a precise estimate of the integrated luminosity of the recorded data set. During the 2015-2018 data-taking period (“Run 2”) of the LHC, lead-lead, proton-lead, and proton-proton collisions at the reference energy were recorded with the CMS experiment. For these data sets, the luminosity measurements are reported. The absolute luminosity scale is calibrated with beam-separation (“van der Meer”) scans, performed separately for each collision system. Several systematic uncertainty sources are studied and corrected for in the analysis of the van der Meer scan data to improve the precision. When applying the van der Meer calibration to the entire data-taking period, a substantial contribution to the total uncertainty in the integrated luminosity originates from the measurement of the detector stability.