Well, it really depends. Some sources indicate trolls to abhor all things christian, so they cannot enter holy ground and church bells send them running away screaming. Being christian is not enough, so grab a cross or an icon. Some sources, on the other hand, would seem to indicate silver or the mythical cold iron to be of use against them, apparently grouping them in the sidhe category. Most agree, however, that sunlight is the bane of all trolls, and that they will immidiately turn to stone. So I'd suggest getting a strong UV light and only going outside during the day.
Depending on the type of troll you're having problems with, they may or may not be gullible and highly vulnerable to trickery. I'd suggest determining the origin of the troll before doing anything hasty. If the beast in question seems to hail from the Norse area, excercise utmost caution. If the troll is a female, beware, for they posses frightening magical powers and can curse you.
Under no circumstances should you enter into a pact with the troll, even if it seems like an incredible deal. If the troll is proposing pacts, it is of the wily category and will, in fact, trick you in some way that may end up with you losing one or more of the following: your life, your freedom, your firstborn child, your virginity (if female), your daughter's virginity, the wellbeing of your land or your own wellbeing. If the troll seems slow-witted or otherwise dim of mind, you should try using trickstery yourself, as there are many succesful proponents to the "fool a troll, get rich quick" scheme. It would seem that the risks are worth it if you posses a quick tongue capable of veritable slyness.
If you have children under the age of one year, remain vigilant for attempts to replace the child with a changeling. Children of talking age or those not sleeping in a crib any more seem to be immune to changeling swaps.
Should you suddenly encounter a beautiful woman of suspiciously positive disposition towards you, remain cautious, as it may in fact be a female troll in disguise. You should determine whether or not the woman in question is trying to hide a tail from you, as shapeshifting female trolls cannot transform their tails.
But above all, remain watchful and alert, for trolls can be wily, cunning beasts capable of elaborate schemes. As you have already determined the existence of the said trolls harassing you, things are looking up, for either you are a clever individual, or the troll is of the much less dangerous dull variety. Or possibly both. Either way, keep that floodlight handy and consider investing in a full-sized bronze church bell.
Oh wait, we're talking about internet trolls? Just ignore those, they cannot steal your infants or enslave you. They can only make you feel bad, and that only works if you let them.