I tried it - ONCE!!! Blew the top off a bunch of bottles, generated a mess in the "brewery", decided it's easier to buy it when I want it. Never tried it again.
If you must do it, this page has a recipe for making root beer with commercial extract and without:
This is a general complaint for most everybody making a bottled carbonated drink for the first time (like beer). Its also why most people don't try again.
As I mentioned, I made a SIMPLE gingerale, mixing homemade extract with sweetener and club soda. Plus it was a mix and drink as you go.
To go full bore, it'll take more knowhow and trials, I would think.
I've made a simple homemade gingerale - simply boiled fresh ginger down to concentrate flavors, cooled, added a simple syrup (sugar water) and club soda.
I assume you'd need sassafras to boil down for root beer.
The FDA says this is slighlty carcinogenic, but I think they're worried about you making ectasy.
Maybe google sassafrass tea, and go from there?