Take it slow
Choose your friends at work carefully, and no matter how well you get along at first, let the friendship develop at its own pace. Don't rush things. Don't share secrets too soon.
Be strategic about what you reveal
while many of us solve our personal problems by discussing them with others, don't do this at work. Gripe too much about all the stress in your life, and the boss may think you're not able to handle your job.
Know your territory
Every office has a personality. It may be happy and open. It could be quiet and private. If it's the latter, do your best to keep your personal life quiet and private as well. And even if it's a happy and open place, it is never appropriate to gossip about other employees' lives.
Learn how to handle conflict
When problems arise between you and another employee, do address them immediately, but do it in a non-confrontational way using specific examples.
Accept an expiration date
This is the sad reality: Office friendships expire. When one or both people move on to new employment, the friendship is likely to last two years at the most.