Our library network (7 libraries) has held a 5K race for the last 11 years. We've been fortunate to have the help of a retired gym teacher/track coach/devoted runner. He makes sure that we get the race listed in the Runner's Calendar each year, and laid out the original course (and when we had road closures a couple years ago, he laid a new route for us) and most importantly of all, a guy who volunteers to do all the time calculations. I'm sure there's a software program out there to do that, but I suspect that the timing part would be the most important thing.
For our race, I get the permits (from the state dept of transportation since we are partially on state roads), organize volunteers for registration, water stations, directional information, and general aid (this one rides a golf cart back and forth along the route). We t-shirts and sometimes other food. I'd suggest you talk to some folks in your area that may have experience in this sort of thing. A good thing to tie it to is some sort of festival that already exists. PM me if you want any more specifics.
"Promise me you'll always remember: You're braver than you believe, and stronger than you seem, and smarter than you think." Christopher Robin to Pooh