Exoplanet search programs need to study how to disentangle radial-velocity (RV) variations due to Doppler motion and the noise induced by stellar activity. We monitored the active K2V HD 189733 with the high-resolution SOPHIE spectrograph (OHP, France). We refined the orbital parameters of HD 189733b and put limitations on the eccentricity and on a long-term velocity gradient. We subtracted the orbital motion of the planet and compared the variability of activity spectroscopic indices (HeI, Hα, Ca II H&K lines) to the evolution of the RV residuals and the shape of spectral lines. All are in agreement with an active stellar surface in rotation. We used such correlations to correct for the RV jitter due to stellar activity. This results in achieving a high precision on the orbital parameters, with a semi-amplitude: K=200.56±0.88m⋅s−1 and a derived planet mass of MP=1.13±0.03 MJup.