When knocking out a Rex be very aware of your surroundings, as they commonly spawn where most of the islands predators are. I recommend using a crossbow for knocking out, as it is the cheapest and most efficient way of doing it. You should also have a flying or fast mount to escape in case things go wrong. Once it's down it's very simple, use this app to determine how much food/narcotics it will need. Also depending on the server, I also recommend placing wooden spike traps around the downed rex so it stays safe. Once it's done taming enjoy your new best friend.
Dont be scared of them, get a flyer and make sure to have a high health and stamina, fly at him (make sure its only one or your dunso) and let him take a bite of your flyer once in a while then lead him into a square wall of dino gates with a trap in it. Once he is stuck quickly close up the open gate, laugh at him and shoot him (alot)