My wife and I were long-distance for the first two years of our relationship.
We made it work by doing the same thing we do now, even though we have lived together for eight years. We had regular text messages or Facebook check-ups, Skype calls, and phone calls throughout the day, evenings, and weekends. On special occasions, we would take a flight to see each other.
It is easier now that we have been living together for a long time, but since we both work all day, most of the day hasn't changed that much. Our only time together is in the evenings and weekends. The rest of the time might as well be long distance.
Make communication a priority, as it should be in any relationship, and spend "quality" time together doing whatever you can do over long distances.