If the barrel is mounted in the wood, hold it upside down, with a square on the butt plate. Out at the front of the rifle, put a triangular file under the barrel where you want to put the sight. Now, gently move the stock and barrel crosswise on the workbench, careful to keep the butt plate perpendicular to the bench top. The file will make a little scratch - that is the center of the barrel as it is mounted.
Octagonal barrel is easier, you already have the top flat done. Octagonal to round, put the top flat of the barrel on the workbench, again with the triangular file crosswise. Move the barrel just a bit from side to side - the scratch will be top dead center.