Spray paint the 18-inch and 6-inch pipe pieces as well as the elbows and flanges, if you want. Work outside or in an area with plenty of ventilation. Let the paint dry for several hours.
Screw the ends of the 18-inch pipe into the elbows, putting one elbow on each end. Attach one end of the 6-inch pipes to the other side of each elbow. Attach the floor flanges to the other end of the 6-inch pipes. Screw the elbows and flanges to the ends very tightly.
Place the pipe rack against the wall where you want it to hang. Use a level to make sure it is even.
Use the pencil to mark the holes on the floor flanges on the wall. You'll have four holes per flange.
Drill a hole at each mark that is the same size as the holes on the flange. Push one anchor into each hole until it is flush with the wall.
Put the pot rack against the wall again, lining up the holes in the flanges with the holes in the wall. Drill one screw into each hole and anchor to securely mount the rack to the wall.
Loop the "S" hooks over the pipe and hang pots and pans from the hooks by their handles.