The most reliable way to do this:
1) Find a system containing a rocky body (they're usually moons) which has no volcanism, geo signals or bio signals.
2) Build a civilian or commercial outpost around it.
3) Do not build anything else in the system which will generate economic influence of a type of Industrial, High-Tech, or Military.
There are other ways to do it as well but this one can in the right circumstances get you all the metals you need by building exactly one thing.