re-carpeting my trailer

I need to re-carpet my trailer. Is there anything I should know before doing this. Do i just cut the carpet and staple it on the wood? Am I supposed to use a glue as well?