CNC machines use precision ground linear bearings. These are expensive.
Too expensive! A meter of 25mm linear rail can cost several hundred
dollars. I myself dont see where the cost is, but anyway.
That said, if you intend to build a machine for precision routing
of aluminum or other dense material, then you will need to use precision
ground linear bearings. They offer smooth movement with very little
side movement. But if your building a CNC table for wood routing,
or a plasma/oxy cutter, then home made linear rails will work fine.
My first CNC table used linear bearings from an old Telix machine
( similar to a dot matrix printer ) for the Z axis. These linear
bearings had reciprocating balls and suited a shaft of 12mm. Modern
printers tend to use brass or bronze bushes instead of bearings,
but these could still be used so long as you keep them oiled.
My I made most of my linear bearings from roller skate bearings
and RHS or SHS ( Box section tubing ). It works, and its cheap.
The important thing is to have some way to adjust out any slack
or play in the rails. My bearings are bolted to the axis on elongated
slots. The slots mean I can loosen off the retaining nuts and move
the bearing closer to the rail. Its a bit fiddly at first, but once
adjusted it tends to stay that way, and I ended up with a machine
with very little sideways play in each axis.
Another linear bearing option is nylon or brass sliders. Nylon,
or HDPE, has a waxy finish and can be easily shaped into sliders.
Like brass or bronze, a nylon slider will need to be kept lubricated
to work properly, and there is more friction than true bearings,
but it can work.