The quick way:
Line aircraft up accurately to N using an external (landing) compass or marked grid. Make sure you are well clear of steel structures etc.
Turn on all normal flight electrics, strobes etc.
Zero error with N/S adjustment screw (and non-magnetic screwdriver).
Align on S
Adjust to halve error using N/S screw.
Align on E and zero error using E/W screw
Align on W and halve the error using E/W screw.
Do complete swing through 30 degree steps and record deviations (which should now be minimised).
Unless you are on PtF this should be signed off by a licensed engineer or ATPL.