Measure the door opening from top to bottom and side to side. Cut 2-by-6 lumber for the frame; three should pieces 5 inches narrower than the opening. These will serve as top and bottom of the door and middle brace. Cut two pieces 6 inches taller. These will be the side vertical pieces of the door. Use a circular saw to make the cuts.
Lay the frame out on an open floor. Align the two vertical pieces parallel with each other with enough space between them to lay the top, middle and bottom pieces horizontally between them so their ends touch the vertical pieces.
Align the top and bottom horizontal pieces so the top edge of the top piece and the top ends of the vertical pieces are flush. Flush the bottom piece of the bottom ends of the verticals. Center the middle brace between the top and bottom pieces.
Attach 3-inch L brackets inside each corner of the joints between parts. Drive one 1¼-inch treated deck screws through each hole in each bracket into the edges of the 2-by-6s with a cordless drill.
Place the two roller carriages for the door, one 6 inches in from each edge, with the plate underneath the wheels on the top of the door frame and the perpendicular plate on the face of the door. Mark the holes in the plates onto the door frame. Drill a 1-inch-deep pilot hole with a 3/16-inch bit in each marked location.
Attach the wheel carriages to the door with 1-by-1/4-inch lag bolts with a socket wrench. Install one lag bolt in each hole.
Measure and cut ½-inch plywood panels to cover the door frame. Make one for the top half of the door and one for the bottom half. Make your cuts with a circular saw. Attach the panels to the door with 1¼-inch treated deck screws around their edges--one screw every 10 inches.
Consult the instructions that come with the barn door hardware to determine the height and placement of the track brackets. It will vary from brand to brand. In general, the brackets should be spaced every 18 to 24 inches and level with each other. For drywall installation, each bracket should be centered on a stud. For concrete or brick, space the brackets evenly, avoiding mortar joints. Position each bracket and mark the mounting holes on the wall.
Drill pilot holes in every marked location. For drywall, drill the holes to a depth of 2 inches with 1/8-inch wood bit. For masonry, the holes should be drilled to a depth of 2 inches with a 3/16-inch rotary mason's bit. Attach the brackets with 2-inch treated deck screws on drywall, or 2-by-1/4 inch Tapcon-style concrete screws. Drive the screws with a cordless drill.
Slide the square tube track into the brackets and tighten the set screws in each bracket to hold it firmly in place. Stand the door upright and slide the rollers into the track from one end. Position a stop at the end of the track, where the leading edge of the door will rest when closed. Drill pilot holes and attach as for track brackets. Open the door fully and position a stop on the wall to catch the door and prevent it sliding off the track. Drill pilot holes and attach the stop as for track brackets.