If you are in your first job you have to walk a long way on your career path. In course of time you would come across different people at your workplaces with whom you would have to deal in different ways. It is to be kept in mind that maintaining a good relation with your colleagues is something that is going to help you in a lot of ways. However, doing something that would make you a favorite among your co-workers instantly is almost impossible. Building a good relation is a gradual process and you have to follow certain rules in that.
The first step towards building a good relation with your colleagues is to perform consistently well. This would make you more reliable among your coworkers who would be able to confide on you easily in course of time, thus resulting in an improved relationship. Your predictability would make you a personal favorite of many.
Second, staying out of office politics can be a good idea if you have to maintain a cordial relation with all. Getting into any such political situation would ask you to align with any one side. Those whom you oppose can develop a negative feeling about you, thus making it even harder to maintain a good relationship with your colleagues.
Third, having a good memory can help you cope with different kinds of situations quite effectively as well as keep in mind the likes and dislikes of your co-workers. This can help you immensely in your future endeavor in establishing a good relation with your colleagues and even your boss to some extent.
Last, no one likes an equivocator and so you have to be genuine in what you do and what you say. A gap between your commitment and your work would not go well with your colleagues who may soon lose faith on you if you repeat the same blunder again and again.